pub trait GrammarLabel: Debug {
    type Symbol: GrammarSymbol;

    // Required methods
    fn first(&self) -> bool;
    fn end(&self) -> Option<Self::Symbol>;
}
Expand description

A common trait that all labels should impl, the labels and impl are generated. You don’t need to impl it in your code.

Required Associated Types§

Required Methods§

source

fn first(&self) -> bool

if self is of form X ::= a . b, return true if a is a terminal or a non-nullable nonterminal and if b is not eps

source

fn end(&self) -> Option<Self::Symbol>

return Some(lhs) if it is the end of a grammar rule lhs -> ..., otherwise None

Implementors§