Hello Nicolas,

Parboiled has a pretty neat system where it tries to remove or replace one
> character to push the parse forward, and if that fails, tries the same
> thing one level up in the rule hierarchy.
>
> Full details: https://github.com/sirthias/parboiled/wiki/Parse-
> Error-Handling
>

It sasy there:

> The strategy that parboiled uses is similar (though somewhat superior) to
the one employed by ANTLR, which itself is based on the thoughts of many
smart people having thought about parsers already a long time ago.


> I'm not sure how good it works in practice, but at least it's something.
>

I haven't used ANTLR in a long while. I recall it did recovery at the
_lexical_ (not the stream) level by inserting, deleting, and replacing
*_tokens_.*

The result used to be lots of output, at one message per failed recovery
more or less, and very long parse times when there were errors.

-- 
Juancarlo *Añez*
_______________________________________________
PEG mailing list
PEG@lists.csail.mit.edu
https://lists.csail.mit.edu/mailman/listinfo/peg

Reply via email to