lib/lrama/counterexamples/example.rb in lrama-0.6.1 vs lib/lrama/counterexamples/example.rb in lrama-0.6.2
- old
+ new
@@ -38,11 +38,11 @@
def _derivations(paths)
derivation = nil
current = :production
lookahead_sym = paths.last.to.item.end_of_rule? ? @conflict_symbol : nil
- paths.reverse.each do |path|
+ paths.reverse_each do |path|
item = path.to.item
case current
when :production
case path
@@ -95,10 +95,10 @@
next_sym = si.item.next_sym
if next_sym == sym
derivation = nil
- sis.reverse.each do |si|
+ sis.reverse_each do |si|
derivation = Derivation.new(si.item, derivation)
end
return derivation
end