pub struct StateTransTable<S, T> { /* private fields */ }Expand description
A state-transition table with symbol type S and tag type T.
Implementations§
Source§impl<S, T> StateTransTable<S, T>
impl<S, T> StateTransTable<S, T>
Sourcepub fn table(&self) -> &[usize]
pub fn table(&self) -> &[usize]
Returns a reference to the internal transition table,
which is a num_equivs * num_states 2d array.
Sourcepub fn num_states(&self) -> usize
pub fn num_states(&self) -> usize
Returns number of states.
Sourcepub fn sym_map(&self) -> &BTreeMap<S, (S, usize)>
pub fn sym_map(&self) -> &BTreeMap<S, (S, usize)>
Returns a reference to the mapping between symbol ranges and equivalence class ID.
The key of the map is the right bound of the range, and
the value is (left_bound, equiv_id).
Returns a reference to the mapping between state IDs and tags.
Only the state presents in this map are final states.
Trait Implementations§
Source§impl<S, T> From<DFA<S, T>> for StateTransTable<S, T>
impl<S, T> From<DFA<S, T>> for StateTransTable<S, T>
Source§impl<S, T> From<RegexMatcher<S, T>> for StateTransTable<S, T>
impl<S, T> From<RegexMatcher<S, T>> for StateTransTable<S, T>
Source§fn from(matcher: RegexMatcher<S, T>) -> Self
fn from(matcher: RegexMatcher<S, T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<S, T> Freeze for StateTransTable<S, T>
impl<S, T> RefUnwindSafe for StateTransTable<S, T>where
T: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, T> Send for StateTransTable<S, T>
impl<S, T> Sync for StateTransTable<S, T>
impl<S, T> Unpin for StateTransTable<S, T>where
T: Unpin,
impl<S, T> UnwindSafe for StateTransTable<S, T>where
S: RefUnwindSafe,
T: UnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more