pub trait ParserProdID:
Copy
+ Debug
+ Eq
+ Into<usize> {
type TokenID: ParserTokenID;
const COUNT: usize;
// Required methods
fn label(&self) -> &'static str;
fn lhs_token_id(&self) -> Self::TokenID;
fn size(&self) -> usize;
}Expand description
A trait representing an identifier for a grammar production rule.
A production defines how tokens and nonterminals combine to form higher-level syntactic constructs. The type implementing this trait is typically generated by parlex-gen’s parser generator ASLR.
Required Associated Constants§
Required Associated Types§
Sourcetype TokenID: ParserTokenID
type TokenID: ParserTokenID
The associated token identifier type.
Required Methods§
Sourcefn lhs_token_id(&self) -> Self::TokenID
fn lhs_token_id(&self) -> Self::TokenID
Returns the token ID of the left-hand side (LHS) nonterminal.
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.