pub struct Grammar<T> { /* private fields */ }Implementations§
Source§impl<T> Grammar<T>
impl<T> Grammar<T>
pub fn new(productions: Vec<Box<dyn Production<T>>>) -> Grammar<T>
pub fn get_starting_rule_name(&self) -> &'static str
pub fn get_rule(&self, name: &str) -> Option<&Rule<T>>
pub fn productions_for_starting_rule(&self) -> &[Box<dyn Production<T>>]
pub fn productions_for(&self, name: &str) -> &[Box<dyn Production<T>>]
pub fn build_table<'a>(&'a self, input: &'a str) -> ItemTable<'a, T>where
T: 'a,
pub fn parse<'a>(&'a self, input: &'a str) -> Option<T>where
T: 'a,
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Grammar<T>
impl<T> !Send for Grammar<T>
impl<T> !Sync for Grammar<T>
impl<T> !UnwindSafe for Grammar<T>
impl<T> Freeze for Grammar<T>
impl<T> Unpin for Grammar<T>
impl<T> UnsafeUnpin for Grammar<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more