Struct hime_redist::parsers::LRExpected
source · Expand description
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
Implementations§
source§impl LRExpected
impl LRExpected
sourcepub fn new() -> LRExpected
pub fn new() -> LRExpected
Initializes this container
sourcepub fn add_unique_shift(&mut self, terminal: Symbol)
pub fn add_unique_shift(&mut self, terminal: Symbol)
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.
sourcepub fn add_unique_reduction(&mut self, terminal: Symbol)
pub fn add_unique_reduction(&mut self, terminal: Symbol)
Adds the specified terminal as expected on a reduction action If the terminal is in the shift collection, nothing happens.