Trait cfg::rule::GrammarRule
[−]
[src]
pub trait GrammarRule { type History; fn lhs(&self) -> Symbol; fn rhs(&self) -> &[Symbol]; fn history(&self) -> &Self::History; }
Trait for rules of a context-free grammar.
Associated Types
type History
The type of history carried with the rule.
Required Methods
fn lhs(&self) -> Symbol
Returns the rule's left-hand side.
fn rhs(&self) -> &[Symbol]
Returns the rule's right-hand side.
fn history(&self) -> &Self::History
Returns a reference to the history carried with the rule.
Implementors
impl<'a, R> GrammarRule for &'a R where R: GrammarRule
impl<H> GrammarRule for Rule<H>
impl<'a, H> GrammarRule for RuleRef<'a, H>