pub trait ParserTokenID:
Copy
+ Debug
+ Eq
+ Into<usize> {
const COUNT_NONTERMINALS: usize;
const COUNT_TERMINALS: usize;
const COUNT: usize;
// Required method
fn label(&self) -> &'static str;
}Expand description
A trait representing an identifier for a terminal or nonterminal token in the grammar.
Token IDs represent both grammar terminals and nonterminals used by the parser. The type implementing this trait is typically generated by parlex-gen’s parser generator ASLR.
Required Associated Constants§
Sourceconst COUNT_NONTERMINALS: usize
const COUNT_NONTERMINALS: usize
The number of nonterminal symbols in the grammar.
Sourceconst COUNT_TERMINALS: usize
const COUNT_TERMINALS: usize
The number of terminal symbols in the grammar.
Required Methods§
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.