class Racc::Parser

def _racc_do_reduce(arg, act)

def _racc_do_reduce(arg, act)
  action_table, action_check, action_default, action_pointer,
  goto_table,   goto_check,   goto_default,   goto_pointer,
  nt_base,      reduce_table, token_table,    shift_n,
  reduce_n,     use_result,   * = arg
  state = @racc_state
  vstack = @racc_vstack
  tstack = @racc_tstack
  i = act * -3
  len       = reduce_table[i]
  reduce_to = reduce_table[i+1]
  method_id = reduce_table[i+2]
  void_array = []
  tmp_t = tstack[-len, len] if @yydebug
  tmp_v = vstack[-len, len]
  tstack[-len, len] = void_array if @yydebug
  vstack[-len, len] = void_array
  state[-len, len]  = void_array
  # tstack must be updated AFTER method call
  if use_result
    vstack.push __send__(method_id, tmp_v, vstack, tmp_v[0])
  else
    vstack.push __send__(method_id, tmp_v, vstack)
  end
  tstack.push reduce_to
  racc_reduce(tmp_t, reduce_to, tstack, vstack) if @yydebug
  k1 = reduce_to - nt_base
  if i = goto_pointer[k1]
    i += state[-1]
    if i >= 0 and (curstate = goto_table[i]) and goto_check[i] == k1
      return curstate
    end
  end
  goto_default[k1]
end