LLVM API Documentation
#include <MCAsmLexer.h>
Public Member Functions | |
virtual | ~MCAsmLexer () |
const AsmToken & | Lex () |
virtual StringRef | LexUntilEndOfStatement ()=0 |
SMLoc | getLoc () const |
getLoc - Get the current source location. | |
const AsmToken & | getTok () |
getTok - Get the current (last) lexed token. | |
virtual const AsmToken | peekTok (bool ShouldSkipSpace=true)=0 |
peekTok - Look ahead at the next token to be lexed. | |
const SMLoc & | getErrLoc () |
getErrLoc - Get the current error location | |
const std::string & | getErr () |
getErr - Get the current error string | |
AsmToken::TokenKind | getKind () const |
getKind - Get the kind of current token. | |
bool | is (AsmToken::TokenKind K) const |
is - Check if the current token has kind K . | |
bool | isNot (AsmToken::TokenKind K) const |
isNot - Check if the current token has kind K . | |
void | setSkipSpace (bool val) |
setSkipSpace - Set whether spaces should be ignored by the lexer | |
bool | getAllowAtInIdentifier () |
void | setAllowAtInIdentifier (bool v) |
Protected Member Functions | |
MCAsmLexer () | |
virtual AsmToken | LexToken ()=0 |
void | SetError (const SMLoc &errLoc, const std::string &err) |
Protected Attributes | |
const char * | TokStart |
bool | SkipSpace |
bool | AllowAtInIdentifier |
MCAsmLexer - Generic assembler lexer interface, for use by target specific assembly lexers.
Definition at line 118 of file MCAsmLexer.h.
MCAsmLexer::MCAsmLexer | ( | ) | [protected] |
Definition at line 15 of file MCAsmLexer.cpp.
MCAsmLexer::~MCAsmLexer | ( | ) | [virtual] |
Definition at line 19 of file MCAsmLexer.cpp.
bool llvm::MCAsmLexer::getAllowAtInIdentifier | ( | ) | [inline] |
Definition at line 188 of file MCAsmLexer.h.
References AllowAtInIdentifier.
const std::string& llvm::MCAsmLexer::getErr | ( | ) | [inline] |
getErr - Get the current error string
Definition at line 172 of file MCAsmLexer.h.
Referenced by llvm::AsmLexer::peekTok().
const SMLoc& llvm::MCAsmLexer::getErrLoc | ( | ) | [inline] |
getErrLoc - Get the current error location
Definition at line 167 of file MCAsmLexer.h.
Referenced by llvm::AsmLexer::peekTok().
AsmToken::TokenKind llvm::MCAsmLexer::getKind | ( | ) | const [inline] |
getKind - Get the kind of current token.
Definition at line 177 of file MCAsmLexer.h.
References llvm::AsmToken::getKind().
SMLoc MCAsmLexer::getLoc | ( | ) | const |
getLoc - Get the current source location.
Definition at line 22 of file MCAsmLexer.cpp.
References llvm::SMLoc::getFromPointer(), and TokStart.
const AsmToken& llvm::MCAsmLexer::getTok | ( | ) | [inline] |
getTok - Get the current (last) lexed token.
Definition at line 159 of file MCAsmLexer.h.
Referenced by llvm::MCAsmParser::getTok().
bool llvm::MCAsmLexer::is | ( | AsmToken::TokenKind | K | ) | const [inline] |
is - Check if the current token has kind K
.
Definition at line 180 of file MCAsmLexer.h.
References llvm::AsmToken::is().
bool llvm::MCAsmLexer::isNot | ( | AsmToken::TokenKind | K | ) | const [inline] |
isNot - Check if the current token has kind K
.
Definition at line 183 of file MCAsmLexer.h.
References llvm::AsmToken::isNot().
const AsmToken& llvm::MCAsmLexer::Lex | ( | ) | [inline] |
Lex - Consume the next token from the input stream and return it.
The lexer will continuosly return the end-of-file token once the end of the main input file has been reached.
Definition at line 149 of file MCAsmLexer.h.
References LexToken().
virtual AsmToken llvm::MCAsmLexer::LexToken | ( | ) | [protected, pure virtual] |
Implemented in llvm::AsmLexer.
Referenced by Lex().
virtual StringRef llvm::MCAsmLexer::LexUntilEndOfStatement | ( | ) | [pure virtual] |
Implemented in llvm::AsmLexer.
virtual const AsmToken llvm::MCAsmLexer::peekTok | ( | bool | ShouldSkipSpace = true | ) | [pure virtual] |
peekTok - Look ahead at the next token to be lexed.
Implemented in llvm::AsmLexer.
void llvm::MCAsmLexer::setAllowAtInIdentifier | ( | bool | v | ) | [inline] |
Definition at line 189 of file MCAsmLexer.h.
References AllowAtInIdentifier.
void llvm::MCAsmLexer::SetError | ( | const SMLoc & | errLoc, |
const std::string & | err | ||
) | [inline, protected] |
Definition at line 137 of file MCAsmLexer.h.
Referenced by llvm::AsmLexer::peekTok().
void llvm::MCAsmLexer::setSkipSpace | ( | bool | val | ) | [inline] |
setSkipSpace - Set whether spaces should be ignored by the lexer
Definition at line 186 of file MCAsmLexer.h.
References SkipSpace.
bool llvm::MCAsmLexer::AllowAtInIdentifier [protected] |
Definition at line 131 of file MCAsmLexer.h.
Referenced by llvm::AsmLexer::AsmLexer(), getAllowAtInIdentifier(), and setAllowAtInIdentifier().
bool llvm::MCAsmLexer::SkipSpace [protected] |
Definition at line 130 of file MCAsmLexer.h.
Referenced by llvm::AsmLexer::LexToken(), llvm::AsmLexer::peekTok(), and setSkipSpace().
const char* llvm::MCAsmLexer::TokStart [protected] |
Definition at line 129 of file MCAsmLexer.h.
Referenced by getLoc(), llvm::AsmLexer::LexToken(), llvm::AsmLexer::LexUntilEndOfLine(), llvm::AsmLexer::LexUntilEndOfStatement(), llvm::AsmLexer::peekTok(), and llvm::AsmLexer::setBuffer().