Enum parol::analysis::lalr1_parse_table::LRConflict
source · pub enum LRConflict {
ReduceReduce {
state: ItemSet,
token: TerminalIndex,
r1: ProductionIndex,
r2: ProductionIndex,
},
ShiftReduce {
state: ItemSet,
token: TerminalIndex,
rule: ProductionIndex,
},
}
Expand description
A LALR(1) parse table conflict.
Duplicate of the lalr
crate’s LR1Conflict
type without the reference to the creating grammar.
Variants§
ReduceReduce
A reduce-reduce conflict.
Fields
§
token: TerminalIndex
The token leading to the conflict, or None
if the token is EOF.
§
r1: ProductionIndex
The first conflicting rule.
§
r2: ProductionIndex
The second conflicting rule.
ShiftReduce
A shift-reduce conflict.
Fields
§
token: TerminalIndex
The token leading to the conflict, or None
if the token is EOF.
§
rule: ProductionIndex
The reduce rule involved in the conflict.
Trait Implementations§
source§impl Debug for LRConflict
impl Debug for LRConflict
source§impl Display for LRConflict
impl Display for LRConflict
source§impl From<LR1Conflict<'_, u16, usize, usize>> for LRConflict
impl From<LR1Conflict<'_, u16, usize, usize>> for LRConflict
source§fn from(
conflict: LR1Conflict<'_, TerminalIndex, NonTerminalIndex, ProductionIndex>,
) -> Self
fn from( conflict: LR1Conflict<'_, TerminalIndex, NonTerminalIndex, ProductionIndex>, ) -> Self
Converts to this type from the input type.
source§impl From<LRConflict> for LRConflictError
impl From<LRConflict> for LRConflictError
source§fn from(conflict: LRConflict) -> Self
fn from(conflict: LRConflict) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LRConflict
impl RefUnwindSafe for LRConflict
impl Send for LRConflict
impl Sync for LRConflict
impl Unpin for LRConflict
impl UnwindSafe for LRConflict
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