klahnakoski / mo-parsing

fork of pyparsing
MIT License
3 stars 2 forks source link

Better error messages #11

Closed klahnakoski closed 3 years ago

klahnakoski commented 3 years ago

I would be nice to provide better error messages so we know what is wrong and what the close alternatives are.

klahnakoski commented 3 years ago

This is still a work in progress: the full list of pattern exceptions is now available.

klahnakoski commented 3 years ago

Every ParseResult must include a list of all the failures that define the rightmost part of the match: https://github.com/klahnakoski/mo-parsing/commit/6cdf6714ee35ea664df8fd6226da695499cd6945 this is then scanned for the rightmost positive match, and the limitations it encounted

https://github.com/klahnakoski/mo-parsing/commit/6cdf6714ee35ea664df8fd6226da695499cd6945#diff-a243441c5f023f2cc56a7da8ae415312a72d2b40a82c8aa3dc335c39f37a8253R42

This is not complete, but good enough as a framework to build a suite of tests