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