Expand description
This crate provides data structures for context-free grammars and LR(1) state machines, and an algorithm to convert a context-free grammar into an LR(1) state machine by the LALR(1) construction.
To use this crate, you should create a Grammar
and call
lalr1
. Then you can use the
LR1ParseTable
to create your own parser.
Re-exports§
Modules§
- config
- This module provides a trait for the configuration of the parse table generation process.
Structs§
- Grammar
- A context-free grammar.
- Item
- An item in an LR(0) state machine, consisting of a rule with a distinguished current position.
- ItemSet
- A set of
Item
s, forming a state in an LR(0) state machine. - LR0State
Machine - An LR(0) state machine.
- LR1Parse
Table - An LR(1) parse table.
- LR1Resolved
Conflict - The resolution of an LR(1) conflict. It is reported to the user during parse table generation.
- LR1State
- A state in an LR(1) parse table.
- Rhs
- The right-hand side of a rule in a context-free grammar.
Enums§
- LR1Conflict
- A conflict detected while trying to construct an LR(1) parse table.
- LRAction
- An action in an LR(1) parse table.
- LRConflict
Resolution - The applied resolution of an LR(1) conflict.
- Symbol
- A symbol in a context-free grammar.