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.
source§impl Ord for LRAction
impl Ord for LRAction
source§impl PartialOrd for LRAction
impl PartialOrd for LRAction
impl Eq for LRAction
impl StructuralPartialEq for LRAction
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.