3 ms·
> For error recovery, do any parsers have a notion of which tokens are more likely to be wrong? lrpar has a %avoid_insert declaration which allows users to say
by ltratt 6y ago
> For error recovery, do any parsers have a notion of which tokens are more likely to be wrong?
lrpar has a %avoid_insert declaration which allows users to say "these token types are better avoided if there are other equivalently good repair sequences". It's simple, but it works well https://softdevteam.github.io/grmtools/master/book/errorrecovery.html#biasing-repair-sequences https://softdevteam.github.io/grmtools/master/book/errorreco...
- maxbrunsfeld 6y agoI like this solution, and have thought about adding something similar as an "advanced feature" in Tree-sitter grammars. I'm interested to see how you've used it in grammars.