Struct bnf_rules_parser::LRItem
source · pub struct LRItem {
pub root_name: String,
pub pattern: Vec<BNFSymbol>,
pub first_set: HashSet<BNFSymbol>,
pub current_position: usize,
pub is_scanned: bool,
}
Fields§
§root_name: String
§pattern: Vec<BNFSymbol>
§first_set: HashSet<BNFSymbol>
§current_position: usize
§is_scanned: bool
Implementations§
source§impl LRItem
impl LRItem
pub fn new(root_name: String) -> Self
pub fn is_last_position(&self) -> bool
pub fn get_next_nonterminal_symbol_name(&self) -> Option<String>
pub fn get_next_symbol(&self) -> Option<BNFSymbol>
pub fn get_latter_pattern(&self) -> Vec<BNFSymbol>
pub fn create_next(&self) -> Option<Self>
Trait Implementations§
source§impl PartialEq for LRItem
impl PartialEq for LRItem
impl Eq for LRItem
impl StructuralPartialEq for LRItem
Auto Trait Implementations§
impl Freeze for LRItem
impl RefUnwindSafe for LRItem
impl Send for LRItem
impl Sync for LRItem
impl Unpin for LRItem
impl UnwindSafe for LRItem
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