|
|
| Think about Loose Coupling | |
| PerlMonks |
Re: Parse::Recdescent optional subrule commitby Anonymous Monk |
| on Apr 30, 2012 at 11:23 UTC ( #968039=note: print w/ replies, xml ) | Need Help?? |
|
I would say this is a bug, but I can't really be sure :) According to my reading of http://search.cpan.org/~jtbraun/Parse-RecDescent-1.967009/lib/Parse/RecDescent.pm#Rejecting_a_production, if you replace reject:$failed with the equivalent
The program will print "WHAT!" and exit So it could be that its a bug, or it could be the gotcha http://search.cpan.org/~jtbraun/Parse-RecDescent-1.967009/lib/Parse/RecDescent.pm#1._Expecting_an_error_to_always_invalidate_a_parse update: It probably is a bug, because the actual equivalent would return UNDEF on failure and not EXIT, and when I do that, the error propagates, so it is probably a bug in reject autohandler or something ... Hooray, I can't fix it :)
update: It think this might be related issue, Bug #62892 for Parse-RecDescent: failed subrules eat text
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||