pub struct WorkingState { /* private fields */ }Expand description
The symbol transitions are assumed to have priority before epsilon transitions, meaning that of all the propogated next symbol transitions available, those going out from the previous transition’s destination will come first.
So, if the symbol transitions should have a lower priority than those found via an epsilon transition, they should be in a new state with a lower priority epsilon transition to it. Due to the way we construct NFAs, this should initially be the case– No state has both incoming and outgoing symbol transitions (they are always separated by at least one epsilon transition) and priority is maintained. We then can optimize where there are no competing transitions.
Implementations§
Source§impl WorkingState
impl WorkingState
pub const fn new() -> WorkingState
pub fn with_transition(self, to: usize, symbol: Atom) -> WorkingState
pub fn with_epsilon(self, to: usize) -> WorkingState
pub fn with_epsilon_special( self, to: usize, special: EpsilonType, ) -> WorkingState
pub fn with_offset(self, offset: usize) -> WorkingState
pub fn inplace_offset(&mut self, offset: usize)
pub fn add_offset(&self, offset: usize) -> WorkingState
Trait Implementations§
Source§impl Clone for WorkingState
impl Clone for WorkingState
Source§fn clone(&self) -> WorkingState
fn clone(&self) -> WorkingState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkingState
impl Debug for WorkingState
Auto Trait Implementations§
impl Freeze for WorkingState
impl RefUnwindSafe for WorkingState
impl Send for WorkingState
impl Sync for WorkingState
impl Unpin for WorkingState
impl UnwindSafe for WorkingState
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