Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Eliminating Left Recursion in Parse::RecDescent

by jmcnamara (Monsignor)
on Mar 21, 2002 at 00:13 UTC ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-19 13:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found