Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 taking refuge in the Monastery: (11)
As of 2015-07-02 02:23 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 (25 votes), past polls