    # File lib/yard/parser/ruby/legacy/ruby_lex.rb, line 1011
          def identify_identifier
            token = ""
            token.concat getc if peek(0) =~ /[$@]/
            token.concat getc if peek(0) == "@"

            while (ch = getc) =~ /\w|_/
              print ":", ch, ":" if RubyLex.debug?
              token.concat ch
            end
            ungetc

            if ch == "!" or ch == "?"
              token.concat getc
            end
            # fix token

            # $stderr.puts "identifier - #{token}, state = #@lex_state"

            case token
            when /^\$/
              return Token(TkGVAR, token).set_text(token)
            when /^\@/
              @lex_state = EXPR_END
              return Token(TkIVAR, token).set_text(token)
            end

            if @lex_state != EXPR_DOT
              print token, "\n" if RubyLex.debug?

              token_c, *trans = TkReading2Token[token]
              if token_c
                # reserved word?

                if (@lex_state != EXPR_BEG &&
                    @lex_state != EXPR_FNAME &&
                    trans[1])
                  # modifiers
                  token_c = TkSymbol2Token[trans[1]]
                  @lex_state = trans[0]
                else
                  if @lex_state != EXPR_FNAME
                    if ENINDENT_CLAUSE.include?(token)
                      @indent += 1

                      if ACCEPTS_COLON.include?(token)
                        @colonblock_seen = true
                      else
                        @colonblock_seen = false
                      end
                    elsif DEINDENT_CLAUSE.include?(token)
                      @indent -= 1
                      @colonblock_seen = false
                    end
                    @lex_state = trans[0]
                  else
                    @lex_state = EXPR_END
                  end
                end
                return Token(token_c, token).set_text(token)
              end
            end

            if @lex_state == EXPR_FNAME
              @lex_state = EXPR_END
              if peek(0) == '='
                token.concat getc
              end
            elsif @lex_state == EXPR_BEG || @lex_state == EXPR_DOT
              @lex_state = EXPR_ARG
            else
              @lex_state = EXPR_END
            end

            if token[0, 1] =~ /[A-Z]/
              return Token(TkCONSTANT, token).set_text(token)
            elsif token[token.size - 1, 1] =~ /[!?]/
              return Token(TkFID, token).set_text(token)
            else
              return Token(TkIDENTIFIER, token).set_text(token)
            end
          end