Enum hime_sdk::grammars::TerminalRef
source · pub enum TerminalRef {
Dummy,
Epsilon,
Dollar,
NullTerminal,
Terminal(usize),
}Expand description
Represents a reference to a terminal-like
Variants§
Dummy
Represents a fake terminal, used as a marker by LR-related algorithms
Epsilon
Represents the epsilon symbol in a grammar, i.e. a terminal with an empty value
Dollar
Represents the dollar symbol in a grammar, i.e. the marker of end of input
NullTerminal
Represents the absence of terminal, used as a marker by LR-related algorithms
Terminal(usize)
A terminal in a grammar
Implementations§
Trait Implementations§
source§impl Clone for TerminalRef
impl Clone for TerminalRef
source§fn clone(&self) -> TerminalRef
fn clone(&self) -> TerminalRef
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for TerminalRef
impl Debug for TerminalRef
source§impl From<FinalItem> for TerminalRef
impl From<FinalItem> for TerminalRef
source§impl From<TerminalRef> for SymbolRef
impl From<TerminalRef> for SymbolRef
source§fn from(terminal: TerminalRef) -> Self
fn from(terminal: TerminalRef) -> Self
Converts to this type from the input type.
source§impl Hash for TerminalRef
impl Hash for TerminalRef
source§impl Ord for TerminalRef
impl Ord for TerminalRef
source§fn cmp(&self, other: &TerminalRef) -> Ordering
fn cmp(&self, other: &TerminalRef) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<TerminalRef> for TerminalRef
impl PartialEq<TerminalRef> for TerminalRef
source§fn eq(&self, other: &TerminalRef) -> bool
fn eq(&self, other: &TerminalRef) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<TerminalRef> for TerminalRef
impl PartialOrd<TerminalRef> for TerminalRef
source§fn partial_cmp(&self, other: &TerminalRef) -> Option<Ordering>
fn partial_cmp(&self, other: &TerminalRef) -> Option<Ordering>
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 Copy for TerminalRef
impl Eq for TerminalRef
impl StructuralEq for TerminalRef
impl StructuralPartialEq for TerminalRef
Auto Trait Implementations§
impl RefUnwindSafe for TerminalRef
impl Send for TerminalRef
impl Sync for TerminalRef
impl Unpin for TerminalRef
impl UnwindSafe for TerminalRef
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