18 releases (9 breaking)
0.10.0 | Dec 23, 2023 |
---|---|
0.8.1 | Dec 20, 2023 |
0.7.0 | Oct 2, 2023 |
#220 in Parser tooling
110 downloads per month
165KB
4K
SLoC
flexi-parse
flexi-parse
is a parsing library intended to be more flexible than parser generators and parser combinators, while still being simple to use.
Features
- Flexible. The parsing machinery supports many diverse grammars, with support for semantic whitespace, single- and double-quoted strings, custom delimiters, and more.
- Simplicity. Built-in types for common symbols and helper macros for punctuation and keywords mean very little hacking is required to parse complex grammars.
- Robustness. Powerful error recovery functionality in both the scanner and the parser allows for reporting every syntax error in a file with pinpoint accuracy.
- Familiarity. The API is very similar to that of
syn
, making transfer fromsyn
very simple.
Examples
Examples of this library in use can be found under the examples
directory.
calc.rs
is a very simple command line calculator in under
100 lines of code, and lox
is an implementation of the
Lox language from Crafting Interpreters with
full compile-time error recovery.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
~1.6–2.3MB
~40K SLoC