Struct parol::analysis::lalr1_parse_table::LR1State
source · pub struct LR1State {
pub actions: BTreeMap<TerminalIndex, LRAction>,
pub gotos: BTreeMap<NonTerminalIndex, usize>,
}
Expand description
A state in the LALR(1) parse table.
Duplicate of the lalr
crate’s LR1State
type without the reference to the creating grammar.
Fields§
§actions: BTreeMap<TerminalIndex, LRAction>
The actions to take for each terminal in the state.
gotos: BTreeMap<NonTerminalIndex, usize>
The gotos to take for each non-terminal in the state.
Trait Implementations§
source§impl From<LR1State<'_, u16, usize, usize>> for LR1State
impl From<LR1State<'_, u16, usize, usize>> for LR1State
source§fn from(
state: LR1State<'_, TerminalIndex, NonTerminalIndex, ProductionIndex>,
) -> Self
fn from( state: LR1State<'_, TerminalIndex, NonTerminalIndex, ProductionIndex>, ) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LR1State
impl RefUnwindSafe for LR1State
impl Send for LR1State
impl Sync for LR1State
impl Unpin for LR1State
impl UnwindSafe for LR1State
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more