Class: Lrama::Counterexamples::Example
- Inherits:
-
Object
- Object
- Lrama::Counterexamples::Example
- Defined in:
- lib/lrama/counterexamples/example.rb
Instance Attribute Summary collapse
-
#conflict ⇒ Object
readonly
Returns the value of attribute conflict.
-
#conflict_symbol ⇒ Object
readonly
Returns the value of attribute conflict_symbol.
-
#path1 ⇒ Object
readonly
Returns the value of attribute path1.
-
#path2 ⇒ Object
readonly
Returns the value of attribute path2.
Instance Method Summary collapse
- #derivations1 ⇒ Object
- #derivations2 ⇒ Object
-
#initialize(path1, path2, conflict, conflict_symbol, counterexamples) ⇒ Example
constructor
path1 is shift conflict when S/R conflict path2 is always reduce conflict.
- #path1_item ⇒ Object
- #path2_item ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(path1, path2, conflict, conflict_symbol, counterexamples) ⇒ Example
path1 is shift conflict when S/R conflict path2 is always reduce conflict
8 9 10 11 12 13 14 |
# File 'lib/lrama/counterexamples/example.rb', line 8 def initialize(path1, path2, conflict, conflict_symbol, counterexamples) @path1 = path1 @path2 = path2 @conflict = conflict @conflict_symbol = conflict_symbol @counterexamples = counterexamples end |
Instance Attribute Details
#conflict ⇒ Object (readonly)
Returns the value of attribute conflict.
4 5 6 |
# File 'lib/lrama/counterexamples/example.rb', line 4 def conflict @conflict end |
#conflict_symbol ⇒ Object (readonly)
Returns the value of attribute conflict_symbol.
4 5 6 |
# File 'lib/lrama/counterexamples/example.rb', line 4 def conflict_symbol @conflict_symbol end |
#path1 ⇒ Object (readonly)
Returns the value of attribute path1.
4 5 6 |
# File 'lib/lrama/counterexamples/example.rb', line 4 def path1 @path1 end |
#path2 ⇒ Object (readonly)
Returns the value of attribute path2.
4 5 6 |
# File 'lib/lrama/counterexamples/example.rb', line 4 def path2 @path2 end |
Instance Method Details
#derivations1 ⇒ Object
28 29 30 |
# File 'lib/lrama/counterexamples/example.rb', line 28 def derivations1 @derivations1 ||= _derivations(path1) end |
#derivations2 ⇒ Object
32 33 34 |
# File 'lib/lrama/counterexamples/example.rb', line 32 def derivations2 @derivations2 ||= _derivations(path2) end |
#path1_item ⇒ Object
20 21 22 |
# File 'lib/lrama/counterexamples/example.rb', line 20 def path1_item @path1.last.to.item end |
#path2_item ⇒ Object
24 25 26 |
# File 'lib/lrama/counterexamples/example.rb', line 24 def path2_item @path2.last.to.item end |
#type ⇒ Object
16 17 18 |
# File 'lib/lrama/counterexamples/example.rb', line 16 def type @conflict.type end |