%{ =head1 SYNOPSIS A deliberately confusing example Almost quoting Pete Jinks at L: The following grammar would confuse any LR(n) or LL(n) parser with a fixed amount of look-ahead: A : B C d | E C f ; B : x y ; E : x y ; C : /* empty */ | C c ; As usual, one of the simplest solutions is to rewrite the grammar to unify the common prefix e.g.: A : BorE C d | BorE C f ; BorE : x y ; C : /* empty */ | C c ; The grammar would confuse any LR(n) or LL(n) parser with a fixed amount of look-ahead See a solution in file: C =head1 SEE ALSO This grammar is a variation of one seen at Pete Jinks page: L Files lr_1_grammar.eyp =cut %} %% A: B C 'd' | E C 'f' ; B: 'x' 'y' ; E: 'x' 'y' ; C: /* empty */ | C 'c' ; %%