[][src]Struct earlgrey::GrammarBuilder

pub struct GrammarBuilder { /* fields omitted */ }

Methods

impl GrammarBuilder[src]

pub fn add_nonterm<S: Into<String>>(&mut self, nt: S, allowdups: bool)[src]

pub fn nonterm<S: Into<String>>(self, nt: S) -> Self[src]

pub fn add_terminal<S, TM>(&mut self, nt: S, tm: TM, allowdups: bool) where
    S: Into<String>,
    TM: 'static + Fn(&str) -> bool
[src]

pub fn terminal<S, TM>(self, nt: S, tm: TM) -> Self where
    S: Into<String>,
    TM: 'static + Fn(&str) -> bool
[src]

pub fn add_rule<H, S>(&mut self, head: H, spec: &[S], allowdups: bool) where
    H: Into<String>,
    S: AsRef<str>, 
[src]

pub fn rule<H, S>(self, head: H, spec: &[S]) -> Self where
    H: Into<String>,
    S: AsRef<str>, 
[src]

pub fn into_grammar<S>(self, start: S) -> Result<Grammar, Error> where
    S: Into<String>, 
[src]

pub fn unique_symbol_name(&self) -> String[src]

Trait Implementations

impl Default for GrammarBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]