pub struct ParseTable<'g> { /* private fields */ }Expand description
An LR(1) parse table.
Implementations§
Source§impl<'g> ParseTable<'g>
impl<'g> ParseTable<'g>
Sourcepub fn build(grammar: &'g Grammar, start_rule: Rule<'g>) -> ParseTable<'g>
pub fn build(grammar: &'g Grammar, start_rule: Rule<'g>) -> ParseTable<'g>
Build a parse table from a gramar.
The start_rule will be used as the top-level production for the table.
Sourcepub fn conflicts(&self) -> Vec<Conflict<'_, '_>>
pub fn conflicts(&self) -> Vec<Conflict<'_, '_>>
Return a list of all of the conflicts found in this table.
pub fn get( &self, state_index: StateIndex, symbol: Option<Symbol<'g>>, ) -> Vec<Action<'g>>
pub fn dump(&self)
Trait Implementations§
Source§impl<'g> Debug for ParseTable<'g>
impl<'g> Debug for ParseTable<'g>
Source§impl<'g> Index<StateIndex> for ParseTable<'g>
impl<'g> Index<StateIndex> for ParseTable<'g>
Auto Trait Implementations§
impl<'g> Freeze for ParseTable<'g>
impl<'g> RefUnwindSafe for ParseTable<'g>
impl<'g> Send for ParseTable<'g>
impl<'g> Sync for ParseTable<'g>
impl<'g> Unpin for ParseTable<'g>
impl<'g> UnsafeUnpin for ParseTable<'g>
impl<'g> UnwindSafe for ParseTable<'g>
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