Enum parol::analysis::lalr1_parse_table::LRAction
source · pub enum LRAction {
Shift(usize),
Reduce(NonTerminalIndex, ProductionIndex),
Accept,
}
Expand description
A LALR(1) parse table action.
The action can be either a shift, reduce, or accept action.
Duplicate of the lalr
crate’s LRAction
type without the reference to the creating grammar.
Variants§
Shift(usize)
Shift the current token and go to the next state.
Reduce(NonTerminalIndex, ProductionIndex)
Reduce to the given production.
Accept
Accept the input.
Trait Implementations§
source§impl From<LRAction<'_, u16, usize, usize>> for LRAction
impl From<LRAction<'_, u16, usize, usize>> for LRAction
source§fn from(
action: LRAction<'_, TerminalIndex, NonTerminalIndex, ProductionIndex>
) -> Self
fn from( action: LRAction<'_, TerminalIndex, NonTerminalIndex, ProductionIndex> ) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LRAction
impl RefUnwindSafe for LRAction
impl Send for LRAction
impl Sync for LRAction
impl Unpin for LRAction
impl UnwindSafe for LRAction
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