Method: Racc::ActionTable#reduce

Defined in:
lib/racc/state.rb

#reduce(i) ⇒ Object



842
843
844
845
846
847
848
849
850
851
852
853
# File 'lib/racc/state.rb', line 842

def reduce(i)
  case i
  when Rule    then i = i.ident
  when Integer then ;
  else
    raise "racc: fatal: wrong class #{i.class} for reduce"
  end

  r = @reduce[i] or raise "racc: fatal: reduce action #{i.inspect} not exist"
  r.incref
  r
end