A lexing and parsing toolkit for Rust
✔️ Crab friendly 🦀
It's written in Rust, with zero dependencies, maximum portability.
✔️ Human friendly
Built with a focus on ergonomics, defining a grammar is closely the same to its Backus–Naur form.
✔️ Powerful
Santiago can parse all context-free languages, including ambiguous and recursive grammars.
✔️ Cutting-edge
Santiago uses the Earley algorithm. Its time and space performance is close to the known theoretical minimum.
Just checkout the examples:
You can run the examples by cloning this project and executing:
sh
/santiago $ cargo run --example calculator
Santiago aims to be an alternative to GNU Bison, Yacc and Flex.
Sadly those long standing tools do not offer Rust compatibility.
In order:
Enforce resolving ambiguities in the input grammar.
Implement a Flex-like interface for the lexer, so that you can really do complex lexing beyond 'char-by-char'
Release 1.0.0
.