pub struct Lalr<T>{
pub table: Tabler<T>,
pub raws: Map<State<T>, State<T>>,
}
Fields§
§table: Tabler<T>
§raws: Map<State<T>, State<T>>
Describes the “raw states” (states without lookahead symbol) in table.kernels
, using it
raw kernel as key and value being its final kernel
Implementations§
source§impl<T> Lalr<T>
impl<T> Lalr<T>
pub fn proc_closures_first_row(&mut self)
pub fn without_look(state: &State<T>) -> State<T>
pub fn prop_closure(&self, seed: State<T>) -> State<T>
pub fn update_closures( &mut self, main: &State<T>, inc: State<T>, closures: State<T> ) -> Option<State<T>>
pub fn update_state( &mut self, main: &State<T>, inc: State<T>, closures: State<T> ) -> Option<State<T>>
Trait Implementations§
source§impl<T> Ord for Lalr<T>
impl<T> Ord for Lalr<T>
source§impl<T> Parser<T> for Lalr<T>
impl<T> Parser<T> for Lalr<T>
fn new(grammar: Grammar<T>) -> Selfwhere
Self: Sized,
fn with_table(table: Tabler<T>) -> Self
fn uninit(table: Tabler<T>) -> Self
fn tables(&self) -> &Tabler<T>
fn tables_mut(&mut self) -> &mut Tabler<T>
fn final_kernel<'a>(&'a self, kernel: &'a State<T>) -> Option<&'a State<T>>
fn dfa<M, I: Iterator<Item = Token<M, T>>>(
&self,
buffer: I,
maps: ReductMap<M, T>
) -> Dfa<M, T, I>where
M: Clone,
fn simple_dfa<I: IntoIterator<Item = Token<(), T>>>( &self, buffer: I ) -> Dfa<(), T, I::IntoIter>
fn cloned<I: Iterator<Item = Token<T, T>>>(&self) -> ReductMap<T, T>
fn empty<I: Iterator<Item = Token<(), T>>>(&self) -> ReductMap<(), T>
source§fn parse<M, I: IntoIterator<Item = Token<M, T>>>(
&self,
buffer: I,
maps: ReductMap<M, T>
) -> BaseResult<M, Error<T>>where
M: Clone,
fn parse<M, I: IntoIterator<Item = Token<M, T>>>(
&self,
buffer: I,
maps: ReductMap<M, T>
) -> BaseResult<M, Error<T>>where
M: Clone,
Errors Read more
source§fn validate<I: IntoIterator<Item = Token<(), T>>>(&self, buffer: I) -> bool
fn validate<I: IntoIterator<Item = Token<(), T>>>(&self, buffer: I) -> bool
Runs
Parser::parse
and checks by errorssource§fn state_from_kernel(&self, kernel: &State<T>) -> Option<usize>
fn state_from_kernel(&self, kernel: &State<T>) -> Option<usize>
Returns the state’s index generated from that passed kernel
source§fn merged(states: State<T>) -> State<T>
fn merged(states: State<T>) -> State<T>
Merges positions that contains the same body, but different lookaheads. I.e:
merged({ [S -> C.C; $], [S -> C.C; c]}) = { [S -> C.C; $ c] } Read more
fn reduce_equals(&mut self)
source§impl<T> PartialEq for Lalr<T>
impl<T> PartialEq for Lalr<T>
source§impl<T> PartialOrd for Lalr<T>
impl<T> PartialOrd for Lalr<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T> Eq for Lalr<T>
impl<T> StructuralEq for Lalr<T>
impl<T> StructuralPartialEq for Lalr<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Lalr<T>where
T: RefUnwindSafe,
impl<T> !Send for Lalr<T>
impl<T> !Sync for Lalr<T>
impl<T> Unpin for Lalr<T>where
T: Unpin,
impl<T> UnwindSafe for Lalr<T>where
T: UnwindSafe + RefUnwindSafe,
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