http://www.perlmonks.org?node_id=153173


in reply to Eliminating Left Recursion in Parse::RecDescent


Left-recursion and the workaround is discussed in D. Conway's article The man(1) of descent in The Perl Journal #12. It is also available in the tutorial dir of the Parse::RecDescent distro.

See the section entitled "Left-recurse ye not!" where the following example is given.

The left-recursive:     Addition: Addition '+' Term | Term

Can be handled as follows:     Addition: (Term '+')(s?) Term

--
John.