lib/lrama/context.rb in lrama-0.6.2 vs lib/lrama/context.rb in lrama-0.6.3

- old
+ new

@@ -263,13 +263,13 @@ end end s = actions.each_with_index.map do |n, i| [i, n] - end.select do |i, n| + end.reject do |i, n| # Remove default_reduction_rule entries - n != 0 + n == 0 end if s.count != 0 # Entry of @_actions is an array of # @@ -460,20 +460,20 @@ end @yylast = high # replace_ninf - @yypact_ninf = (@base.select {|i| i != BaseMin } + [0]).min - 1 + @yypact_ninf = (@base.reject {|i| i == BaseMin } + [0]).min - 1 @base.map! do |i| case i when BaseMin @yypact_ninf else i end end - @yytable_ninf = (@table.compact.select {|i| i != ErrorActionNumber } + [0]).min - 1 + @yytable_ninf = (@table.compact.reject {|i| i == ErrorActionNumber } + [0]).min - 1 @table.map! do |i| case i when nil 0 when ErrorActionNumber