Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Parse::RecDescent matching same line twice

by kudra (Vicar)
on Mar 01, 2009 at 20:24 UTC ( #747344=note: print w/ replies, xml ) Need Help??


in reply to Re: Parse::RecDescent matching same line twice
in thread Parse::RecDescent matching same line twice

Thank you for your answer; that appears to be what is happening. I figured it was due to my lack of knowledge about P::RD. I was puzzled by the way it appeared some of my test cases were rejecting the first rule without consequence.


Comment on Re^2: Parse::RecDescent matching same line twice
Re^3: Parse::RecDescent matching same line twice
by ikegami (Pope) on Mar 01, 2009 at 20:59 UTC
    It's just like in regexps
    'XZ' =~ / ^ (?: X (?{ print "X" }) Y (?{ print "Y" }) | X (?{ print "X" }) Z (?{ print "Z" }) ) \z /x; print("\n");
    XXZ

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2015-07-03 16:56 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 (54 votes), past polls