algorithm=LR; terminal a, b; S -> E & ~A B & ~B A; A -> X A X | a; B -> X B X | b; E -> E X X | e; X -> a | b;