Struct perplex::item_set::ItemSet [−][src]
pub struct ItemSet { /* fields omitted */ }
An item set.
Methods
impl ItemSet
[src]
impl ItemSet
pub fn new(id: ItemSetId) -> ItemSet
[src]
pub fn new(id: ItemSetId) -> ItemSet
Create a new item set.
pub fn with_items(id: ItemSetId, items: Vec<Item>) -> ItemSet
[src]
pub fn with_items(id: ItemSetId, items: Vec<Item>) -> ItemSet
Create a new item set with certain items.
pub fn id(&self) -> ItemSetId
[src]
pub fn id(&self) -> ItemSetId
Get the id of the item set.
pub fn items(&self) -> &[Item]
[src]
pub fn items(&self) -> &[Item]
Get the items in the set.
pub fn kernel_items(&self) -> &[Item]
[src]
pub fn kernel_items(&self) -> &[Item]
Get the kernel items in the set.
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 set.
pub fn closure(&mut self, grammar: &Grammar, first_sets: &FirstSets)
[src]
pub fn closure(&mut self, grammar: &Grammar, first_sets: &FirstSets)
Compute the closure of the item set.
pub fn kernel_item_cores(&self) -> KernelCores
[src]
pub fn kernel_item_cores(&self) -> KernelCores
Compute the kernel item cores.
The returned struct can be used to compare two item sets for equality in their kernel item cores.
pub fn replace_actions(&mut self, from: Action, to: Action)
[src]
pub fn replace_actions(&mut self, from: Action, to: Action)
Replace all occurrences of one action with another.
ⓘImportant traits for Actions<'a>pub fn actions(&self) -> Actions
[src]
pub fn actions(&self) -> Actions
Get an iterator over the actions in the set.
ⓘImportant traits for ActionsMut<'a>pub fn actions_mut(&mut self) -> ActionsMut
[src]
pub fn actions_mut(&mut self) -> ActionsMut
Get a mutable iterator over the actions in the set.
pub fn merge(&mut self, other: ItemSet)
[src]
pub fn merge(&mut self, other: ItemSet)
Merge another item set into this.
pub fn compress(&mut self)
[src]
pub fn compress(&mut self)
Compress the item set.
This will remove redundant items and replace their lookahead token with
a #
.
Trait Implementations
impl Debug for ItemSet
[src]
impl Debug for ItemSet
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 Clone for ItemSet
[src]
impl Clone for ItemSet
fn clone(&self) -> ItemSet
[src]
fn clone(&self) -> ItemSet
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)
Performs copy-assignment from source
. Read more
impl PartialEq for ItemSet
[src]
impl PartialEq for ItemSet
fn eq(&self, other: &ItemSet) -> bool
[src]
fn eq(&self, other: &ItemSet) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ItemSet) -> bool
[src]
fn ne(&self, other: &ItemSet) -> bool
This method tests for !=
.
impl Eq for ItemSet
[src]
impl Eq for ItemSet
impl Hash for ItemSet
[src]
impl Hash for ItemSet