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
54 /// Used to inform the lexer as to whether it's starting at the beginning of
59 /// Lexer - This provides a simple interface that turns a text buffer into a
63 class Lexer : public PreprocessorLexer {
67 // Constant configuration values for this lexer.
72 bool Is_PragmaLexer; // True if lexer for _Pragma handling.
78 /// ExtendedTokenMode - The lexer can optionally keep comments and whitespace
90 // in Lexer::isNextPPTokenLParen.
109 Lexer(const Lexer &) = delete;
110 void operator=(const Lexer &) = delete;
116 /// Lexer constructor - Create a new lexer object for the specified buffer
117 /// with the specified preprocessor managing the lexing process. This lexer
120 Lexer(FileID FID, const llvm::MemoryBuffer *InputBuffer, Preprocessor &PP);
122 /// Lexer constructor - Create a new raw lexer object. This object is only
123 /// suitable for calls to 'LexFromRawLexer'. This lexer assumes that the
125 Lexer(SourceLocation FileLoc, const LangOptions &LangOpts,
128 /// Lexer constructor - Create a new raw lexer object. This object is only
129 /// suitable for calls to 'LexFromRawLexer'. This lexer assumes that the
131 Lexer(FileID FID, const llvm::MemoryBuffer *InputBuffer,
134 /// Create_PragmaLexer: Lexer constructor - Create a new lexer object for
136 /// sets up. It returns a new'd Lexer that must be delete'd when done.
137 static Lexer *Create_PragmaLexer(SourceLocation SpellingLoc,
144 /// NOTE: this lexer modifies features as a file is parsed!
159 /// isPragmaLexer - Returns true if this Lexer is being used to lex a pragma.
168 /// LexFromRawLexer - Lex a token from a designated raw lexer (one with no
170 /// read' pointer points at the end of the lexer buffer, false otherwise.
175 // lexer when in raw mode.
179 /// isKeepWhitespaceMode - Return true if the lexer should return tokens for
195 /// inKeepCommentMode - Return true if the lexer should return comments as
201 /// SetCommentRetentionMode - Change the comment retention mode of the lexer
203 /// mode, because otherwise the lexer needs to manage this.
211 /// language options and preprocessor. This controls whether the lexer
214 /// This requires the lexer to have an associated preprocessor. A standalone
215 /// lexer has nothing to reset to.
224 /// uninterpreted string. This switches the lexer out of directive mode.
345 /// components that don't have access to the lexer and thus can't find the
439 /// This differs from Lexer::getImmediateMacroName in that any macro argument
446 /// Lexer::getImmediateMacroName will return "MAC2".
539 /// tokens in the buffer controlled by this lexer.
543 // Lexer character reading interfaces.
545 // This lexer is built on two interfaces for reading characters, both of which
554 // returning it and its size. If the lexer decides that this character is
636 // Other lexer functions.