pub trait NonTerminal: Copy {
// Required methods
fn is_trace(&self) -> bool;
fn nonterm_type(&self) -> Option<NonTerminalType>;
fn as_str(&self) -> &'static str;
fn to_usize(&self) -> usize;
// Provided methods
fn is_auto_generated(&self) -> bool { ... }
fn is_augmented(&self) -> bool { ... }
}Expand description
A struct to hold information about non-terminal symbols
Required Methods§
Sourcefn nonterm_type(&self) -> Option<NonTerminalType>
fn nonterm_type(&self) -> Option<NonTerminalType>
for internal use only; If this non-terminal is auto-generated, gets the pattern where this non-terminal was generated from.
Provided Methods§
Sourcefn is_auto_generated(&self) -> bool
fn is_auto_generated(&self) -> bool
Whether this non-terminal is auto-generated by rustylr. Some non-terminals could be auto-generated to handle regex patterns, character sets, etc.
Sourcefn is_augmented(&self) -> bool
fn is_augmented(&self) -> bool
Augmented rule will be generated for entry point of the grammar.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.