Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The reference parser is implemented with the [nom] library which allows easily writing parsers through combinator functions. The parser has been implemented by replicating the grammar supported by the Python parser (cf. [`get_ref_parser`]). Notably, the combinator functions are named roughly the same as their corresponding `pyparsing` functions in the Python implementation. Note that the Rust implementation doesn't yet support inventory queries (default syntax `$[...]`). However, the Reclass reference `${...}` parsing should be compatible with the Python parser including the extension which allows nested references. The parser implementation comes with a large amount of unit tests for edge and corner cases which can appear when working with references. [nom]: https://docs.rs/nom [`get_ref_parser`]: https://github.com/kapicorp/reclass/blob/856b34cb77811d665c6346883238d436ac5c4924/reclass/values/parser_funcs.py#L103-L168
- Loading branch information