pub enum Symbol {
N(String, SymbolAttribute, Option<UserDefinedTypeName>),
T(Terminal),
S(ScannerIndex),
Push(ScannerIndex),
Pop,
}
Expand description
A grammar symbol with different specificities
Variants§
N(String, SymbolAttribute, Option<UserDefinedTypeName>)
Non-terminal symbol, Meta symbol of the grammar.
T(Terminal)
Terminal symbol of the grammar.
S(ScannerIndex)
Instruction to switch scanner state
Push(ScannerIndex)
Instruction to push the index of the current scanner and switch to a scanner configuration with the given index
Pop
Instruction to pop the index of the scanner pushed before and switch to the scanner configuration with that index
Implementations§
Trait Implementations§
source§impl Ord for Symbol
impl Ord for Symbol
source§impl PartialEq for Symbol
impl PartialEq for Symbol
source§impl PartialOrd for Symbol
impl PartialOrd for Symbol
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Symbol
impl StructuralPartialEq for Symbol
Auto Trait Implementations§
impl Freeze for Symbol
impl RefUnwindSafe for Symbol
impl Send for Symbol
impl Sync for Symbol
impl Unpin for Symbol
impl UnwindSafe for Symbol
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<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.