Class: Lrama::State::ShiftReduceConflict
- Inherits:
-
Object
- Object
- Lrama::State::ShiftReduceConflict
- Defined in:
- lib/lrama/state/shift_reduce_conflict.rb
Instance Attribute Summary collapse
-
#reduce ⇒ Object
readonly
: State::Action::Reduce.
-
#shift ⇒ Object
readonly
: State::Action::Shift.
-
#symbols ⇒ Object
readonly
: Array.
Instance Method Summary collapse
-
#initialize(symbols:, shift:, reduce:) ⇒ ShiftReduceConflict
constructor
A new instance of ShiftReduceConflict.
- #type ⇒ Object
Constructor Details
#initialize(symbols:, shift:, reduce:) ⇒ ShiftReduceConflict
Returns a new instance of ShiftReduceConflict.
12 13 14 15 16 |
# File 'lib/lrama/state/shift_reduce_conflict.rb', line 12 def initialize(symbols:, shift:, reduce:) @symbols = symbols @shift = shift @reduce = reduce end |
Instance Attribute Details
#reduce ⇒ Object (readonly)
: State::Action::Reduce
9 10 11 |
# File 'lib/lrama/state/shift_reduce_conflict.rb', line 9 def reduce @reduce end |
#shift ⇒ Object (readonly)
: State::Action::Shift
8 9 10 |
# File 'lib/lrama/state/shift_reduce_conflict.rb', line 8 def shift @shift end |
#symbols ⇒ Object (readonly)
: Array
7 8 9 |
# File 'lib/lrama/state/shift_reduce_conflict.rb', line 7 def symbols @symbols end |
Instance Method Details
#type ⇒ Object
19 20 21 |
# File 'lib/lrama/state/shift_reduce_conflict.rb', line 19 def type :shift_reduce end |