class Treetop::Runtime::CompiledParser

def has_terminal?(terminal, regex, index)

def has_terminal?(terminal, regex, index)
  if regex
    rx = @regexps[terminal] ||= Regexp.new(terminal)
    input.index(rx, index) == index
  else
    input[index, terminal.size] == terminal
  end
end