class TGLexer
Declaration
class TGLexer { /* full declaration omitted */ };
Description
TGLexer - TableGen Lexer class.
Declared at: llvm/lib/TableGen/TGLexer.h:81
Member Variables
- private llvm::SourceMgr& SrcMgr
- private const char* CurPtr = nullptr
- private llvm::StringRef CurBuf
- private const char* TokStart = nullptr
- private tgtok::TokKind CurCode = tgtok::TokKind::Eof
- private std::string CurStrVal
- private int64_t CurIntVal = 0
- private unsigned int CurBuffer = 0
- CurBuffer - This is the current buffer index we're lexing from as managed by the SourceMgr object.
- private llvm::TGLexer::DependenciesSetTy Dependencies
- Dependencies - This is the list of all included files.
- private StringSet<> DefinedMacros
- private std::vector<std::unique_ptr< std::vector<PreprocessorControlDesc>>> PrepIncludeStack
Method Overview
- public tgtok::TokKind Lex()
- private tgtok::TokKind LexBracket()
- private tgtok::TokKind LexExclaim()
- private tgtok::TokKind LexIdentifier()
- private bool LexInclude()
- private tgtok::TokKind LexNumber()
- private tgtok::TokKind LexString()
- private tgtok::TokKind LexToken(bool FileOrLineStart = false)
- private tgtok::TokKind LexVarName()
- private tgtok::TokKind ReturnError(llvm::SMLoc Loc, const llvm::Twine & Msg)
- private tgtok::TokKind ReturnError(const char * Loc, const llvm::Twine & Msg)
- private void SkipBCPLComment()
- private bool SkipCComment()
- public TGLexer(llvm::SourceMgr & SrcMgr, ArrayRef<std::string> Macros)
- public tgtok::TokKind getCode() const
- public std::pair<int64_t, unsigned int> getCurBinaryIntVal() const
- public int64_t getCurIntVal() const
- public const std::string & getCurStrVal() const
- public const llvm::TGLexer::DependenciesSetTy & getDependencies() const
- public llvm::SMLoc getLoc() const
- private int getNextChar()
- private tgtok::TokKind lexPreprocessor(tgtok::TokKind Kind, bool ReturnNextLiveToken = true)
- private int peekNextChar(int Index) const
- private bool prepEatPreprocessorDirective(tgtok::TokKind Kind)
- private bool prepExitInclude(bool IncludeStackMustBeEmpty)
- private tgtok::TokKind prepIsDirective() const
- private bool prepIsProcessingEnabled()
- private llvm::StringRef prepLexMacroName()
- private void prepReportPreprocessorStackError()
- private bool prepSkipDirectiveEnd()
- private bool prepSkipLineBegin()
- private bool prepSkipRegion(bool MustNeverBeFalse)
- private void prepSkipToLineEnd()
- private bool processEOF()
Methods
¶tgtok::TokKind Lex()
tgtok::TokKind Lex()
Declared at: llvm/lib/TableGen/TGLexer.h:107
¶tgtok::TokKind LexBracket()
tgtok::TokKind LexBracket()
Declared at: llvm/lib/TableGen/TGLexer.h:151
¶tgtok::TokKind LexExclaim()
tgtok::TokKind LexExclaim()
Declared at: llvm/lib/TableGen/TGLexer.h:152
¶tgtok::TokKind LexIdentifier()
tgtok::TokKind LexIdentifier()
Declared at: llvm/lib/TableGen/TGLexer.h:146
¶bool LexInclude()
bool LexInclude()
Declared at: llvm/lib/TableGen/TGLexer.h:147
¶tgtok::TokKind LexNumber()
tgtok::TokKind LexNumber()
Declared at: llvm/lib/TableGen/TGLexer.h:150
¶tgtok::TokKind LexString()
tgtok::TokKind LexString()
Declared at: llvm/lib/TableGen/TGLexer.h:148
¶tgtok::TokKind LexToken(
bool FileOrLineStart = false)
tgtok::TokKind LexToken(
bool FileOrLineStart = false)
Description
LexToken - Read the next token and return its code.
Declared at: llvm/lib/TableGen/TGLexer.h:137
Parameters
- bool FileOrLineStart = false
¶tgtok::TokKind LexVarName()
tgtok::TokKind LexVarName()
Declared at: llvm/lib/TableGen/TGLexer.h:149
¶tgtok::TokKind ReturnError(llvm::SMLoc Loc,
const llvm::Twine& Msg)
tgtok::TokKind ReturnError(llvm::SMLoc Loc,
const llvm::Twine& Msg)
Declared at: llvm/lib/TableGen/TGLexer.h:139
Parameters
- llvm::SMLoc Loc
- const llvm::Twine& Msg
¶tgtok::TokKind ReturnError(const char* Loc,
const llvm::Twine& Msg)
tgtok::TokKind ReturnError(const char* Loc,
const llvm::Twine& Msg)
Declared at: llvm/lib/TableGen/TGLexer.h:140
Parameters
- const char* Loc
- const llvm::Twine& Msg
¶void SkipBCPLComment()
void SkipBCPLComment()
Declared at: llvm/lib/TableGen/TGLexer.h:144
¶bool SkipCComment()
bool SkipCComment()
Declared at: llvm/lib/TableGen/TGLexer.h:145
¶TGLexer(llvm::SourceMgr& SrcMgr,
ArrayRef<std::string> Macros)
TGLexer(llvm::SourceMgr& SrcMgr,
ArrayRef<std::string> Macros)
Declared at: llvm/lib/TableGen/TGLexer.h:105
Parameters
- llvm::SourceMgr& SrcMgr
- ArrayRef<std::string> Macros
¶tgtok::TokKind getCode() const
tgtok::TokKind getCode() const
Declared at: llvm/lib/TableGen/TGLexer.h:115
¶std::pair<int64_t, unsigned int>
getCurBinaryIntVal() const
std::pair<int64_t, unsigned int>
getCurBinaryIntVal() const
Declared at: llvm/lib/TableGen/TGLexer.h:127
¶int64_t getCurIntVal() const
int64_t getCurIntVal() const
Declared at: llvm/lib/TableGen/TGLexer.h:123
¶const std::string& getCurStrVal() const
const std::string& getCurStrVal() const
Declared at: llvm/lib/TableGen/TGLexer.h:117
¶const llvm::TGLexer::DependenciesSetTy&
getDependencies() const
const llvm::TGLexer::DependenciesSetTy&
getDependencies() const
Declared at: llvm/lib/TableGen/TGLexer.h:111
¶llvm::SMLoc getLoc() const
llvm::SMLoc getLoc() const
Declared at: llvm/lib/TableGen/TGLexer.h:133
¶int getNextChar()
int getNextChar()
Declared at: llvm/lib/TableGen/TGLexer.h:142
¶tgtok::TokKind lexPreprocessor(
tgtok::TokKind Kind,
bool ReturnNextLiveToken = true)
tgtok::TokKind lexPreprocessor(
tgtok::TokKind Kind,
bool ReturnNextLiveToken = true)
Declared at: llvm/lib/TableGen/TGLexer.h:280
Parameters
- tgtok::TokKind Kind
- bool ReturnNextLiveToken = true
¶int peekNextChar(int Index) const
int peekNextChar(int Index) const
Declared at: llvm/lib/TableGen/TGLexer.h:143
Parameters
- int Index
¶bool prepEatPreprocessorDirective(
tgtok::TokKind Kind)
bool prepEatPreprocessorDirective(
tgtok::TokKind Kind)
Declared at: llvm/lib/TableGen/TGLexer.h:250
Parameters
- tgtok::TokKind Kind
¶bool prepExitInclude(bool IncludeStackMustBeEmpty)
bool prepExitInclude(bool IncludeStackMustBeEmpty)
Declared at: llvm/lib/TableGen/TGLexer.h:232
Parameters
- bool IncludeStackMustBeEmpty
¶tgtok::TokKind prepIsDirective() const
tgtok::TokKind prepIsDirective() const
Declared at: llvm/lib/TableGen/TGLexer.h:240
¶bool prepIsProcessingEnabled()
bool prepIsProcessingEnabled()
Declared at: llvm/lib/TableGen/TGLexer.h:372
¶llvm::StringRef prepLexMacroName()
llvm::StringRef prepLexMacroName()
Declared at: llvm/lib/TableGen/TGLexer.h:322
¶void prepReportPreprocessorStackError()
void prepReportPreprocessorStackError()
Declared at: llvm/lib/TableGen/TGLexer.h:377
¶bool prepSkipDirectiveEnd()
bool prepSkipDirectiveEnd()
Declared at: llvm/lib/TableGen/TGLexer.h:360
¶bool prepSkipLineBegin()
bool prepSkipLineBegin()
Declared at: llvm/lib/TableGen/TGLexer.h:342
¶bool prepSkipRegion(bool MustNeverBeFalse)
bool prepSkipRegion(bool MustNeverBeFalse)
Declared at: llvm/lib/TableGen/TGLexer.h:295
Parameters
- bool MustNeverBeFalse
¶void prepSkipToLineEnd()
void prepSkipToLineEnd()
Declared at: llvm/lib/TableGen/TGLexer.h:365
¶bool processEOF()
bool processEOF()
Declared at: llvm/lib/TableGen/TGLexer.h:159