Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Operator Associativity and Eliminating Left-Recursion in Parse::RecDescentby hexcoder (Curate) |
on Jun 13, 2014 at 23:33 UTC ( [id://1089860]=note: print w/replies, xml ) | Need Help?? |
Thanks very much, a very very useful tutorial! I especially like the methodical and analytical approach very much.
Some small things I found in the text:
have the same preceedence
The following subsections show how to evaluate the list how to treeify it.
In a list, that means the means the last (right-most) element encountered will be executed first.
Fortuantely, Parse::RecDescent provides a means
and each reference to that rule
Just like function can have arguments, so can subrules.
However, Parse::RecDescent handles rule with productions
Just like Parse::RecDescent has an directive for creating a flat list for a left-associative operator (<lefttop>),
The problem we have to pass $item[1] from pow to pow_.
The following subsections contains complete, working code
In Section
Tutorials
|
|