J-F-Liu / pom

PEG parser combinators using operator overloading without macros.
MIT License
496 stars 30 forks source link

Parse error human-readable messages maybe should translate u8s to ascii #56

Open mcclure opened 1 year ago

mcclure commented 1 year ago

The recommended way to use pom (per your examples) is parsing 'u8's. If pom fails to match, it gives messages like: Err(Mismatch { message: "expect: 120, found: 101", position: 1 }) Here "120" is ascii "x" and "101" is ascii "e". Since usually pom will be interpreting text, it would make sense to convert these values to characters if they happen to match printable ASCII.

Did I miss a feature that can do this already?

J-F-Liu commented 1 year ago

This is not implemented yet.