Goal: a library that extends nom to provide better tools for text formats (programming languages, configuration files).
Recognizing line and column in input data: nom-locate
Using nom-supreme
parsers need to be fault tolerant: recovering from the current error allows parsing the rest of the file: https://eyalkalderon.com/blog/nom-error-recovery/
We should also allow for various error levels (like warnings, that would not stop compilation)
precedence rules can be annoying to write
- precedence support: rust-bakery/nom#1362
most language parsers end up calling themselves recursively, resulting in stack overflow issues
if we have error spans, we should be able to display more context, like rustc's errors
- https://github.com/zkat/miette
- https://github.com/zesterer/ariadne
- https://github.com/brendanzab/codespan
should we support multiple phases, with &str -> Vec<Token>
functions followed by &[Token] -> AST
functions?