[−][src]Struct earlgrey::GrammarBuilder
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]
S: Into<String>,
TM: 'static + Fn(&str) -> bool,
pub fn terminal<S, TM>(self, nt: S, tm: TM) -> Self where
S: Into<String>,
TM: 'static + Fn(&str) -> bool,
[src]
S: Into<String>,
TM: 'static + Fn(&str) -> bool,
pub fn add_rule<H, S>(&mut self, head: H, spec: &[S], allowdups: bool) where
H: Into<String>,
S: AsRef<str>,
[src]
H: Into<String>,
S: AsRef<str>,
pub fn rule<H, S>(self, head: H, spec: &[S]) -> Self where
H: Into<String>,
S: AsRef<str>,
[src]
H: Into<String>,
S: AsRef<str>,
pub fn into_grammar<S>(self, start: S) -> Result<Grammar, Error> where
S: Into<String>,
[src]
S: Into<String>,
pub fn unique_symbol_name(&self) -> String
[src]
Trait Implementations
impl Default for GrammarBuilder
[src]
fn default() -> GrammarBuilder
[src]
Auto Trait Implementations
impl !Send for GrammarBuilder
impl !Sync for GrammarBuilder
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,