Struct cfg::prediction::LastSets
source · pub struct LastSets { /* private fields */ }
Expand description
FIRST sets.
Implementations§
source§impl LastSets
impl LastSets
sourcepub fn new<'a, G>(grammar: &'a G) -> Selfwhere
G: RuleContainer + Default,
for<'b> &'b G: RuleContainerRef<'b, Target = G>,
pub fn new<'a, G>(grammar: &'a G) -> Selfwhere G: RuleContainer + Default, for<'b> &'b G: RuleContainerRef<'b, Target = G>,
Compute all LAST sets of the grammar.
We define a binary relation LAST(N, S), in which N is related to S
if the grammar has a production of the form N ⸬= α S β
, where
β is a nullable string of symbols.
We compute the transitive closure of this relation.
sourcepub fn last_sets(&self) -> &PerSymbolSets
pub fn last_sets(&self) -> &PerSymbolSets
Returns a reference to FIRST sets.
Auto Trait Implementations§
impl RefUnwindSafe for LastSets
impl Send for LastSets
impl Sync for LastSets
impl Unpin for LastSets
impl UnwindSafe for LastSets
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