[−][src]Struct gll_pg_core::GSSState
All GSS Parser states. It is used by generated code, don't use it directly.
Fields
graph: Graph<GSSNode<L>, SPPFNodeIndex, Directed>
Direct GSS graph
nodes: BTreeMap<GSSNode<L>, NodeIndex>
Mapping from node to its index
sppf_nodes: Vec<SPPFNode<L>>
All sppf nodes, and nodes reference each other by index
initial_node_index: NodeIndex
visited: Vec<BTreeSet<(L, NodeIndex, SPPFNodeIndex)>>
U_j in original paper
todo: Vec<(L, NodeIndex, usize, SPPFNodeIndex)>
R in original paper
pop: BTreeSet<(NodeIndex, SPPFNodeIndex)>
P in original paper
current_position: usize
C_i in original paper
current_node_index: NodeIndex
C_u in original paper
current_sppf_node: usize
C_n in original paper
Methods
impl<L: Ord + Clone + GrammarLabel> GSSState<L>
[src]
pub fn add(&mut self, l: L, u: NodeIndex, i: usize, w: SPPFNodeIndex)
[src]
The add
function in the paper
pub fn pop(&mut self, u: NodeIndex, i: usize, z: SPPFNodeIndex)
[src]
The pop
function in the paper
pub fn create(
&mut self,
l: L,
u: NodeIndex,
j: usize,
w: SPPFNodeIndex
) -> NodeIndex
[src]
&mut self,
l: L,
u: NodeIndex,
j: usize,
w: SPPFNodeIndex
) -> NodeIndex
The create
function in the paper
pub fn get_node_t(&mut self, x: L::Symbol, i: usize) -> SPPFNodeIndex
[src]
The get_node_t
function in the paper
pub fn get_node_p(
&mut self,
l: L,
w: SPPFNodeIndex,
z: SPPFNodeIndex
) -> SPPFNodeIndex
[src]
&mut self,
l: L,
w: SPPFNodeIndex,
z: SPPFNodeIndex
) -> SPPFNodeIndex
The get_node_p
function in the paper
pub fn collect_symbols(&self, node: SPPFNodeIndex) -> Vec<SPPFNodeIndex>
[src]
Collect all symbol leaves of a packed node
Auto Trait Implementations
impl<L> Send for GSSState<L> where
L: Send,
<L as GrammarLabel>::Symbol: Send,
L: Send,
<L as GrammarLabel>::Symbol: Send,
impl<L> Sync for GSSState<L> where
L: Sync,
<L as GrammarLabel>::Symbol: Sync,
L: Sync,
<L as GrammarLabel>::Symbol: Sync,
impl<L> Unpin for GSSState<L> where
L: Unpin,
<L as GrammarLabel>::Symbol: Unpin,
L: Unpin,
<L as GrammarLabel>::Symbol: Unpin,
impl<L> UnwindSafe for GSSState<L> where
L: RefUnwindSafe + UnwindSafe,
<L as GrammarLabel>::Symbol: UnwindSafe,
L: RefUnwindSafe + UnwindSafe,
<L as GrammarLabel>::Symbol: UnwindSafe,
impl<L> RefUnwindSafe for GSSState<L> where
L: RefUnwindSafe,
<L as GrammarLabel>::Symbol: RefUnwindSafe,
L: RefUnwindSafe,
<L as GrammarLabel>::Symbol: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,