Struct hime_redist::parsers::LRExpected
[−]
[src]
pub struct LRExpected { pub shifts: Vec<Symbol>, pub reductions: Vec<Symbol>, }
Container for the expected terminals for a LR state
Fields
shifts: Vec<Symbol>
The terminals expected for shift actions
reductions: Vec<Symbol>
The terminals expected for reduction actions
Methods
impl LRExpected
[src]
pub fn new() -> LRExpected
[src]
Initializes this container
pub fn add_unique_shift(&mut self, terminal: Symbol)
[src]
Adds the specified terminal as expected on a shift action If the terminal is already added to the reduction collection it is removed from it.
pub fn add_unique_reduction(&mut self, terminal: Symbol)
[src]
Adds the specified terminal as expected on a reduction action If the terminal is in the shift collection, nothing happens.