diff --git a/lib/lrama/grammar.rb b/lib/lrama/grammar.rb index 6b53d5b3..81fa3ffc 100644 --- a/lib/lrama/grammar.rb +++ b/lib/lrama/grammar.rb @@ -663,8 +663,8 @@ def fill_symbol_number nterm_token_id = 0 used_numbers = {} - @symbols.map(&:number).each do |n| - used_numbers[n] = true + @symbols.each do |symbol| + used_numbers[symbol.number] = true end (@symbols.select(&:term?) + @symbols.select(&:nterm?)).each do |sym|