Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Eliminating Left Recursion in Parse::RecDescent

by ikegami (Pope)
on Jun 06, 2006 at 19:14 UTC ( #553895=note: print w/ replies, xml ) Need Help??


in reply to Eliminating Left Recursion in Parse::RecDescent

I use the {1} here to emulate the behaviour of an e match. Perhaps theres a better way, if so let me know.

Just use nothing.

expr : term expr_tail expr_tail : '+' term expr_tail |

or

expr : term expr_tail expr_tail : '+' term expr_tail |

or a comment

expr : term expr_tail expr_tail : '+' term expr_tail | # Nothing

or an empty rule

expr : term expr_tail expr_tail : '+' term expr_tail | Epsilon Epsilon :


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://553895]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2014-12-25 19:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (162 votes), past polls