Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

From the Con-Man himself

by princepawn (Parson)
on Sep 29, 2000 at 13:12 UTC ( #34574=note: print w/replies, xml ) Need Help??


in reply to Returning contents of subrules matches with Parse::RecDescent

Here is what the master, Damian Conway, sayeth:
Your problem is in this rule: tuple : (number dot)(2) is the same as: tuple : anon_subrule(2) anon_subrule : number dot Liek all subrules, this anonymous subrule returns only its last item (namely, the dot). If you want just the number back, write this: tuple : (number dot {$item[1]})(2) If you want both number and dot back (in a nested array), write this: tuple : (number dot {\@item})(2) Hope this helps, Damian

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://34574]
help
Chatterbox?
[Corion]: And so far I like signatures and nobody has yet come up to me and screamed at me for implementing a source filter to handle them even on early Perl versions ;)
[Corion]: I should re-prod tsee about the Filter::Simple branches that he might want to merge or that I should merge so he can do a release ;-D

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2017-02-27 14:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (388 votes). Check out past polls.