# File lib/html5/tokenizer.rb, line 762
    def after_doctype_name_state
      data = @stream.char
      if SPACE_CHARACTERS.include? data
      elsif data == ">"
        @token_queue << @current_token
        @state = :data_state
      elsif data == :EOF
        @current_token[:correct] = false
        @stream.unget(data)
        @token_queue << {:type => :ParseError, :data => "eof-in-doctype"}
        @token_queue << @current_token
        @state = :data_state
      else
        char_stack = [data]  
        5.times { char_stack << stream.char }
        token = char_stack.join('').tr(ASCII_UPPERCASE,ASCII_LOWERCASE)
        if token == "public" and !char_stack.include?(:EOF)
          @state = :before_doctype_public_identifier_state
        elsif token == "system" and !char_stack.include?(:EOF)
          @state = :before_doctype_system_identifier_state
        else
          @stream.unget(char_stack)
          @token_queue << {:type => :ParseError, :data => "expected-space-or-right-bracket-in-doctype", "datavars" => {"data" => data}}
          @state = :bogus_doctype_state
        end
      end
      return true
    end