Struct lrtable::StateGraph [−][src]
Implementations
impl<StorageT: 'static + Hash + PrimInt + Unsigned> StateGraph<StorageT> where
usize: AsPrimitive<StorageT>,
[src]
impl<StorageT: 'static + Hash + PrimInt + Unsigned> StateGraph<StorageT> where
usize: AsPrimitive<StorageT>,
[src]pub fn start_state(&self) -> StIdx
[src]
pub fn start_state(&self) -> StIdx
[src]Return this state graph’s start state.
pub fn iter_stidxs(&self) -> Box<dyn Iterator<Item = StIdx>>
[src]
pub fn iter_stidxs(&self) -> Box<dyn Iterator<Item = StIdx>>
[src]Return an iterator which produces (in order from 0..self.rules_len()
) all this
grammar’s valid RIdx
s.
pub fn closed_state(&self, stidx: StIdx) -> &Itemset<StorageT>
[src]
pub fn closed_state(&self, stidx: StIdx) -> &Itemset<StorageT>
[src]Return the itemset for closed state stidx
. Panics if stidx
doesn’t exist.
pub fn iter_closed_states<'a>(
&'a self
) -> Box<dyn Iterator<Item = &'a Itemset<StorageT>> + 'a>
[src]
pub fn iter_closed_states<'a>(
&'a self
) -> Box<dyn Iterator<Item = &'a Itemset<StorageT>> + 'a>
[src]Return an iterator over all closed states in this StateGraph
.
pub fn core_state(&self, stidx: StIdx) -> &Itemset<StorageT>
[src]
pub fn core_state(&self, stidx: StIdx) -> &Itemset<StorageT>
[src]Return the itemset for core state stidx
or None
if it doesn’t exist.
pub fn iter_core_states<'a>(
&'a self
) -> Box<dyn Iterator<Item = &'a Itemset<StorageT>> + 'a>
[src]
pub fn iter_core_states<'a>(
&'a self
) -> Box<dyn Iterator<Item = &'a Itemset<StorageT>> + 'a>
[src]Return an iterator over all core states in this StateGraph
.
pub fn all_states_len(&self) -> StIdx
[src]
pub fn all_states_len(&self) -> StIdx
[src]How many states does this StateGraph
contain? NB: By definition the StateGraph
contains
the same number of core and closed states.
pub fn edge(&self, stidx: StIdx, sym: Symbol<StorageT>) -> Option<StIdx>
[src]
pub fn edge(&self, stidx: StIdx, sym: Symbol<StorageT>) -> Option<StIdx>
[src]Return the state pointed to by sym
from stidx
or None
otherwise.
pub fn edges(&self, stidx: StIdx) -> &HashMap<Symbol<StorageT>, StIdx>
[src]
pub fn edges(&self, stidx: StIdx) -> &HashMap<Symbol<StorageT>, StIdx>
[src]Return the edges for state stidx
. Panics if stidx
doesn’t exist.
pub fn all_edges_len(&self) -> usize
[src]
pub fn all_edges_len(&self) -> usize
[src]How many edges does this StateGraph
contain?
pub fn pp(&self, grm: &YaccGrammar<StorageT>, core_states: bool) -> String
[src]
pub fn pp(&self, grm: &YaccGrammar<StorageT>, core_states: bool) -> String
[src]Pretty print this stategraph as a String
. If core_states
is set to true, only the core
states are pretty printed; if set to false, all states (including non-core states) are
pretty printed.
pub fn pp_core_states(&self, grm: &YaccGrammar<StorageT>) -> String
[src]
pub fn pp_core_states(&self, grm: &YaccGrammar<StorageT>) -> String
[src]Return a pretty printed version of the core states, and all edges.
pub fn pp_closed_states(&self, grm: &YaccGrammar<StorageT>) -> String
[src]
pub fn pp_closed_states(&self, grm: &YaccGrammar<StorageT>) -> String
[src]Return a pretty printed version of the closed states, and all edges.
Trait Implementations
Auto Trait Implementations
impl<StorageT> RefUnwindSafe for StateGraph<StorageT> where
StorageT: RefUnwindSafe,
StorageT: RefUnwindSafe,
impl<StorageT> Send for StateGraph<StorageT> where
StorageT: Send,
StorageT: Send,
impl<StorageT> Sync for StateGraph<StorageT> where
StorageT: Sync,
StorageT: Sync,
impl<StorageT> Unpin for StateGraph<StorageT> where
StorageT: Unpin,
StorageT: Unpin,
impl<StorageT> UnwindSafe for StateGraph<StorageT> where
StorageT: UnwindSafe,
StorageT: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more