pub struct State<T> {
pub rule: usize,
pub left: usize,
pub right: Vec<usize>,
pub position: usize,
pub original_set: usize,
pub kind: EarleyKind,
pub values: Vec<T>,
pub computed_value: Option<T>,
pub ambiguity_info: AmbiguityInfo<T>,
}
Fields§
§rule: usize
The associate rule to this state.
left: usize
Token in the left.
right: Vec<usize>
Tokens in the right.
position: usize
The state boundary. I.e., number of tokens in the right already processed. Equals right.len()
when already processed.
original_set: usize
The state set from where this state was predicted.
kind: EarleyKind
A record of which produced the state and used to compute the final value.
values: Vec<T>
§computed_value: Option<T>
When we have a computed value it is stored here.
ambiguity_info: AmbiguityInfo<T>
Stores information about ambiguities when they happen.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for State<T>where T: RefUnwindSafe,
impl<T> Send for State<T>where T: Send,
impl<T> Sync for State<T>where T: Sync,
impl<T> Unpin for State<T>where T: Unpin,
impl<T> UnwindSafe for State<T>where 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