![]() |
|
No such thing as a small change | |
PerlMonks |
Re: Parse::RecDescent matching same line twiceby ikegami (Patriarch) |
on Mar 01, 2009 at 18:12 UTC ( #747329=note: print w/replies, xml ) | Need Help?? |
When the score is settled, each character of the text can only be matched by two rules if one rule is a production of another.
But in reaching that state, a rule can match, then be unmatched by a backtrack. For example, given the grammar
foo1 could matched, but PRD will backtrack if it can't follow with a foo2 match. It will then try bar1. I'm guessing one of your productions has side-effects, so you falsely believed it has matched even though a backtrack unmatched it. I could very well be wrong because I have very little data to go on. Update: In the following example, you'll see foo1 on the screen even though it wasn't matched.
In Section
Seekers of Perl Wisdom
|
|