I call the "backtrack" mode, "forgiving" mode. The term "backtrack" is
overloaded in the parsing context.
Marpa::R2 has come very close to allowing a "forgiving" flag for
tokens. In a previous version it was "implemented", but not tested or
documented. I put "implemented" in quotes, because often documentation
and testing reveals that an already-implemented feature is not quite as
fully implemented as I'd imagined.
If someone will commit to writing a test case for forgiving mode, I will
put other stuff aside and make implementing it my next priority. Wrt
the test case: make it a good one, but don't worry about the packaging
-- I'll redo all that anyway when I put it in the test suite. Also, you
may not want to start on it until I settle on the syntax -- just let me
know that you're interested in doing it.
-- jeffrey
On 01/07/2014 01:47 PM, Ruslan Zakirov wrote:
On Wed, Jan 8, 2014 at 1:16 AM, Ron Savage <[email protected]
<mailto:[email protected]>> wrote:
Sometimes I catch myself assuming that LTM failures backtrack and
try a shorter match, the same way I assume it for regexps.
And sometimes I don't catch myself assuming that :-((.
Well, regexps have nobacktrack mode, so tokenizer can have optional
backtrack mode.
Played a little with "longest expected token match" a little in Repa
and it helped me get rid of a grammar workaround I had, so it proves
itself to be useful. Combining this with per token flag may be even
more powerful.
--
You received this message because you are subscribed to the Google
Groups "marpa parser" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected]
<mailto:marpa-parser%[email protected]>.
For more options, visit https://groups.google.com/groups/opt_out.
--
Best regards, Ruslan.
--
You received this message because you are subscribed to the Google
Groups "marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "marpa
parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.