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

Methods

tgtok::TokKind Lex()

Declared at: llvm/lib/TableGen/TGLexer.h:107

tgtok::TokKind LexBracket()

Declared at: llvm/lib/TableGen/TGLexer.h:151

tgtok::TokKind LexExclaim()

Declared at: llvm/lib/TableGen/TGLexer.h:152

tgtok::TokKind LexIdentifier()

Declared at: llvm/lib/TableGen/TGLexer.h:146

bool LexInclude()

Declared at: llvm/lib/TableGen/TGLexer.h:147

tgtok::TokKind LexNumber()

Declared at: llvm/lib/TableGen/TGLexer.h:150

tgtok::TokKind LexString()

Declared at: llvm/lib/TableGen/TGLexer.h:148

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()

Declared at: llvm/lib/TableGen/TGLexer.h:149

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)

Declared at: llvm/lib/TableGen/TGLexer.h:140

Parameters

const char* Loc
const llvm::Twine& Msg

void SkipBCPLComment()

Declared at: llvm/lib/TableGen/TGLexer.h:144

bool SkipCComment()

Declared at: llvm/lib/TableGen/TGLexer.h:145

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

Declared at: llvm/lib/TableGen/TGLexer.h:115

std::pair<int64_t, unsigned int>
getCurBinaryIntVal() const

Declared at: llvm/lib/TableGen/TGLexer.h:127

int64_t getCurIntVal() const

Declared at: llvm/lib/TableGen/TGLexer.h:123

const std::string& getCurStrVal() const

Declared at: llvm/lib/TableGen/TGLexer.h:117

const llvm::TGLexer::DependenciesSetTy&
getDependencies() const

Declared at: llvm/lib/TableGen/TGLexer.h:111

llvm::SMLoc getLoc() const

Declared at: llvm/lib/TableGen/TGLexer.h:133

int getNextChar()

Declared at: llvm/lib/TableGen/TGLexer.h:142

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

Declared at: llvm/lib/TableGen/TGLexer.h:143

Parameters

int Index

bool prepEatPreprocessorDirective(
    tgtok::TokKind Kind)

Declared at: llvm/lib/TableGen/TGLexer.h:250

Parameters

tgtok::TokKind Kind

bool prepExitInclude(bool IncludeStackMustBeEmpty)

Declared at: llvm/lib/TableGen/TGLexer.h:232

Parameters

bool IncludeStackMustBeEmpty

tgtok::TokKind prepIsDirective() const

Declared at: llvm/lib/TableGen/TGLexer.h:240

bool prepIsProcessingEnabled()

Declared at: llvm/lib/TableGen/TGLexer.h:372

llvm::StringRef prepLexMacroName()

Declared at: llvm/lib/TableGen/TGLexer.h:322

void prepReportPreprocessorStackError()

Declared at: llvm/lib/TableGen/TGLexer.h:377

bool prepSkipDirectiveEnd()

Declared at: llvm/lib/TableGen/TGLexer.h:360

bool prepSkipLineBegin()

Declared at: llvm/lib/TableGen/TGLexer.h:342

bool prepSkipRegion(bool MustNeverBeFalse)

Declared at: llvm/lib/TableGen/TGLexer.h:295

Parameters

bool MustNeverBeFalse

void prepSkipToLineEnd()

Declared at: llvm/lib/TableGen/TGLexer.h:365

bool processEOF()

Declared at: llvm/lib/TableGen/TGLexer.h:159