lib/lrama/context.rb in lrama-0.5.9 vs lib/lrama/context.rb in lrama-0.5.10
- old
+ new
@@ -307,14 +307,12 @@
def compute_yydefgoto
# Default GOTO (nterm transition) for each nterm.
# Index is sequence number of nterm, value is state id
# of a default nterm transition destination.
@yydefgoto = Array.new(@states.nterms.count, 0)
- h = {}
# Mapping from nterm to next_states
nterm_to_next_states = {}
- terms_count = @states.terms.count
@states.states.each do |state|
state.nterm_transitions.each do |shift, next_state|
key = shift.next_sym
nterm_to_next_states[key] ||= []
@@ -367,10 +365,10 @@
@sorted_actions << action
next
end
j = @sorted_actions.count - 1
- state_id, froms_and_tos, count, width = action
+ _state_id, _froms_and_tos, count, width = action
while (j >= 0) do
case
when @sorted_actions[j][3] < width
j -= 1