Struct perplex::item_set::Item [−][src]
pub struct Item { /* fields omitted */ }
A single item.
Methods
impl Item
[src]
impl Item
pub fn rule(&self) -> RuleId
[src]
pub fn rule(&self) -> RuleId
Get the rule this item represents.
pub fn lookahead(&self) -> TerminalId
[src]
pub fn lookahead(&self) -> TerminalId
Get the lookahead terminal of this item.
pub fn marker(&self) -> usize
[src]
pub fn marker(&self) -> usize
Get the position of the marker within the rule.
pub fn action(&self) -> Option<(Symbol, Action)>
[src]
pub fn action(&self) -> Option<(Symbol, Action)>
Get the action associated with this item.
pub fn set_action(&mut self, action: Option<(Symbol, Action)>)
[src]
pub fn set_action(&mut self, action: Option<(Symbol, Action)>)
Change the action of this item.
pub fn pretty<'a>(
&'a self,
grammar: &'a Grammar
) -> Pretty<&'a Grammar, &'a Self>
[src]
pub fn pretty<'a>(
&'a self,
grammar: &'a Grammar
) -> Pretty<&'a Grammar, &'a Self>
Get a pretty printer for this item.
pub fn is_shift(&self) -> bool
[src]
pub fn is_shift(&self) -> bool
Whether this item has a shift action.
pub fn is_reduce(&self) -> bool
[src]
pub fn is_reduce(&self) -> bool
Whether this item has a reduce action.
pub fn has_action(&self) -> bool
[src]
pub fn has_action(&self) -> bool
Whether this item has an action.
Trait Implementations
impl Debug for Item
[src]
impl Debug for Item
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for Item
[src]
impl Copy for Item
impl Clone for Item
[src]
impl Clone for Item
fn clone(&self) -> Item
[src]
fn clone(&self) -> Item
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for Item
[src]
impl PartialEq for Item
fn eq(&self, other: &Item) -> bool
[src]
fn eq(&self, other: &Item) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Item) -> bool
[src]
fn ne(&self, other: &Item) -> bool
This method tests for !=
.
impl Eq for Item
[src]
impl Eq for Item
impl Hash for Item
[src]
impl Hash for Item