class Rouge::RegexLexer

def goto(state_name)

replace the head of the stack with the given state
def goto(state_name)
  raise 'empty stack!' if stack.empty?
  puts "    going to state :#{state_name} " if @debug
  stack[-1] = get_state(state_name)
end