Expand description
§rusty_lr
A Yacc-like, procedural macro-based parser generator for Rust supporting LR(1), LALR(1), and GLR parsing strategies.
RustyLR enables you to define context-free grammars (CFGs) directly in Rust using macros or build scripts. It constructs deterministic finite automata (DFA) at compile time, ensuring efficient and reliable parsing.
Modules§
- builder
- module for build DFA tables from CFG
- glr
- module for GLR parser
- lr
- module for LR(1), LALR(1) parser
Macros§
- lr1
- Build a LR(1) Deterministic Finite Automaton (DFA) parser.
Structs§
- Backtrace
- Backtracing information for parsing context. What current parser was trying to parse, and what rules were applied.
- Default
Reduce Action Error - Default error type for reduce action
- HashMap
- A hash map implemented with quadratic probing and SIMD lookup.
- HashSet
- A hash set implemented as a
HashMapwhere the value is(). - Lookahead
Rule - shifted rule with lookahead tokens
- Lookahead
Rule RefSet - set of lookahead rules
- Production
Rule - Production rule.
- Shifted
Rule - Shifted
Rule Ref - A struct for single shifted named production rule.
Enums§
- Reduce
Type - for resolving shift/reduce conflict
- Token
- Token represents a terminal or non-terminal symbol in the grammar.