pub struct Production {
pub idx: ProdIndex,
pub nonterminal: NonTermIndex,
pub ntidx: usize,
pub kind: Option<String>,
pub rhs: Vec<ResolvingAssignment>,
pub assoc: Associativity,
pub prio: Priority,
pub dynamic: bool,
pub nops: bool,
pub nopse: bool,
pub meta: BTreeMap<String, ConstVal>,
}
Fields§
§idx: ProdIndex
§nonterminal: NonTermIndex
§ntidx: usize
§kind: Option<String>
§rhs: Vec<ResolvingAssignment>
§assoc: Associativity
§prio: Priority
§dynamic: bool
§nops: bool
§nopse: bool
§meta: BTreeMap<String, ConstVal>
Implementations§
Source§impl Production
impl Production
pub fn rhs_symbols(&self) -> Vec<SymbolIndex>
Sourcepub fn rhs_assign(&self) -> Vec<Assignment>
pub fn rhs_assign(&self) -> Vec<Assignment>
Returns resolved RHS assignments
Sourcepub fn rhs_with_content(&self, grammar: &Grammar) -> Vec<Assignment>
pub fn rhs_with_content(&self, grammar: &Grammar) -> Vec<Assignment>
Returns RHS assignment which has some content (i.e. non-terminals and non-constant terminals).
pub fn rhs_symbol(&self, pos: usize) -> SymbolIndex
pub fn nonterminal<'a>(&self, grammar: &'a Grammar) -> &'a NonTerminal
pub fn to_string(&self, grammar: &Grammar) -> String
Trait Implementations§
Source§impl Debug for Production
impl Debug for Production
Source§impl Default for Production
impl Default for Production
Source§impl Display for Production
impl Display for Production
Source§impl Hash for Production
impl Hash for Production
Source§impl Ord for Production
impl Ord for Production
Source§impl PartialEq for Production
impl PartialEq for Production
Source§impl PartialOrd for Production
impl PartialOrd for Production
impl Eq for Production
Auto Trait Implementations§
impl Freeze for Production
impl RefUnwindSafe for Production
impl Send for Production
impl Sync for Production
impl Unpin for Production
impl UnwindSafe for Production
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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