in reply to Re: Re: Backtracking in Parse::RecDescent (solution)
in thread Backtracking in Parse::RecDescent

The answer is that RecDescent parsers do not work that way. They don't backtrack on failure; they just fail. Of course, there's nothing to prevent a recursive descent parser from incorporating backtracking too, but RecDescent doesn't.

So, if you need backtracking in part of your grammar, you need to use plain old regexes there. Sorry.

Damian

  • Comment on Re: Re: Re: Backtracking in Parse::RecDescent (solution)

Replies are listed 'Best First'.
Re: Re: Re: Re: Backtracking in Parse::RecDescent (solution)
by ruscoekm (Monk) on Dec 09, 2002 at 08:15 UTC
    Thanks Damian. It's one thing to suspect an explanation; quite another to have it confirmed :)

    Kevin