|
LLVM
3.7.0
|
Generic assembler lexer interface, for use by target specific assembly lexers. More...
#include <MCAsmLexer.h>
Public Member Functions | |
| virtual | ~MCAsmLexer () |
| const AsmToken & | Lex () |
| Consume the next token from the input stream and return it. More... | |
| virtual StringRef | LexUntilEndOfStatement ()=0 |
| SMLoc | getLoc () const |
| Get the current source location. More... | |
| const AsmToken & | getTok () const |
| Get the current (last) lexed token. More... | |
| virtual const AsmToken | peekTok (bool ShouldSkipSpace=true)=0 |
| Look ahead at the next token to be lexed. More... | |
| const SMLoc & | getErrLoc () |
| Get the current error location. More... | |
| const std::string & | getErr () |
| Get the current error string. More... | |
| AsmToken::TokenKind | getKind () const |
| Get the kind of current token. More... | |
| bool | is (AsmToken::TokenKind K) const |
Check if the current token has kind K. More... | |
| bool | isNot (AsmToken::TokenKind K) const |
Check if the current token has kind K. More... | |
| void | setSkipSpace (bool val) |
| Set whether spaces should be ignored by the lexer. More... | |
| 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 |
Generic assembler lexer interface, for use by target specific assembly lexers.
Definition at line 119 of file MCAsmLexer.h.
|
protected |
Definition at line 15 of file MCAsmLexer.cpp.
|
virtual |
Definition at line 19 of file MCAsmLexer.cpp.
|
inline |
Definition at line 189 of file MCAsmLexer.h.
References AllowAtInIdentifier.
|
inline |
Get the current error string.
Definition at line 173 of file MCAsmLexer.h.
Referenced by llvm::AsmLexer::peekTok().
Get the current error location.
Definition at line 168 of file MCAsmLexer.h.
Referenced by llvm::AsmLexer::peekTok().
|
inline |
Get the kind of current token.
Definition at line 178 of file MCAsmLexer.h.
References llvm::AsmToken::getKind().
| SMLoc MCAsmLexer::getLoc | ( | ) | const |
Get the current source location.
Definition at line 22 of file MCAsmLexer.cpp.
References llvm::SMLoc::getFromPointer(), and TokStart.
Referenced by llvm::MCParserUtils::parseAssignmentExpression().
Get the current (last) lexed token.
Definition at line 160 of file MCAsmLexer.h.
Referenced by llvm::MCAsmParser::getTok().
|
inline |
Check if the current token has kind K.
Definition at line 181 of file MCAsmLexer.h.
References llvm::AsmToken::is().
|
inline |
Check if the current token has kind K.
Definition at line 184 of file MCAsmLexer.h.
References llvm::AsmToken::isNot().
Referenced by llvm::MCParserUtils::parseAssignmentExpression().
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 150 of file MCAsmLexer.h.
References LexToken().
|
protectedpure virtual |
Implemented in llvm::AsmLexer.
Referenced by Lex().
|
pure virtual |
Implemented in llvm::AsmLexer.
Look ahead at the next token to be lexed.
Implemented in llvm::AsmLexer.
|
inline |
Definition at line 190 of file MCAsmLexer.h.
References AllowAtInIdentifier.
Definition at line 138 of file MCAsmLexer.h.
Referenced by llvm::AsmLexer::peekTok().
|
inline |
Set whether spaces should be ignored by the lexer.
Definition at line 187 of file MCAsmLexer.h.
References SkipSpace.
|
protected |
Definition at line 132 of file MCAsmLexer.h.
Referenced by llvm::AsmLexer::AsmLexer(), getAllowAtInIdentifier(), and setAllowAtInIdentifier().
|
protected |
Definition at line 131 of file MCAsmLexer.h.
Referenced by llvm::AsmLexer::LexToken(), llvm::AsmLexer::peekTok(), and setSkipSpace().
|
protected |
Definition at line 130 of file MCAsmLexer.h.
Referenced by getLoc(), llvm::AsmLexer::LexToken(), llvm::AsmLexer::LexUntilEndOfLine(), llvm::AsmLexer::LexUntilEndOfStatement(), llvm::AsmLexer::peekTok(), and llvm::AsmLexer::setBuffer().
1.8.6