Home | History | Annotate | Download | only in Lex

Lines Matching defs:Lexer

1 //===--- Lexer.h - C Language Family Lexer ----------------------*- C++ -*-===//
10 // This file defines the Lexer interface.
29 /// ConflictMarkerKind - Kinds of conflict marker which the lexer might be
42 /// Lexer - This provides a simple interface that turns a text buffer into a
46 class Lexer : public PreprocessorLexer {
50 // Constant configuration values for this lexer.
55 bool Is_PragmaLexer; // True if lexer for _Pragma handling.
61 /// ExtendedTokenMode - The lexer can optionally keep comments and whitespace
73 // in Lexer::isNextPPTokenLParen.
92 Lexer(const Lexer &) = delete;
93 void operator=(const Lexer &) = delete;
99 /// Lexer constructor - Create a new lexer object for the specified buffer
100 /// with the specified preprocessor managing the lexing process. This lexer
103 Lexer(FileID FID, const llvm::MemoryBuffer *InputBuffer, Preprocessor &PP);
105 /// Lexer constructor - Create a new raw lexer object. This object is only
106 /// suitable for calls to 'LexFromRawLexer'. This lexer assumes that the
108 Lexer(SourceLocation FileLoc, const LangOptions &LangOpts,
111 /// Lexer constructor - Create a new raw lexer object. This object is only
112 /// suitable for calls to 'LexFromRawLexer'. This lexer assumes that the
114 Lexer(FileID FID, const llvm::MemoryBuffer *InputBuffer,
117 /// Create_PragmaLexer: Lexer constructor - Create a new lexer object for
119 /// sets up. It returns a new'd Lexer that must be delete'd when done.
120 static Lexer *Create_PragmaLexer(SourceLocation SpellingLoc,
127 /// NOTE: this lexer modifies features as a file is parsed!
142 /// isPragmaLexer - Returns true if this Lexer is being used to lex a pragma.
151 /// LexFromRawLexer - Lex a token from a designated raw lexer (one with no
153 /// read' pointer points at the end of the lexer buffer, false otherwise.
158 // lexer when in raw mode.
162 /// isKeepWhitespaceMode - Return true if the lexer should return tokens for
178 /// inKeepCommentMode - Return true if the lexer should return comments as
184 /// SetCommentRetentionMode - Change the comment retention mode of the lexer
186 /// mode, because otherwise the lexer needs to manage this.
194 /// language options and preprocessor. This controls whether the lexer
197 /// This requires the lexer to have an associated preprocessor. A standalone
198 /// lexer has nothing to reset to.
207 /// uninterpreted string. This switches the lexer out of directive mode.
328 /// components that don't have access to the lexer and thus can't find the
422 /// This differs from Lexer::getImmediateMacroName in that any macro argument
429 /// Lexer::getImmediateMacroName will return "MAC2".
518 /// tokens in the buffer controlled by this lexer.
522 // Lexer character reading interfaces.
524 // This lexer is built on two interfaces for reading characters, both of which
533 // returning it and its size. If the lexer decides that this character is
615 // Other lexer functions.