Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Eliminating Left Recursion in Parse::RecDescent

by jmcnamara (Monsignor)
on Mar 21, 2002 at 00:13 UTC ( #153173=note: print w/ replies, xml ) Need Help??


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.


Comment on Re: Eliminating Left Recursion in Parse::RecDescent
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://153173]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2015-07-07 00:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (86 votes), past polls