|
LLVM
5.0.0
|
Generic assembler lexer interface, for use by target specific assembly lexers. More...
#include "llvm/MC/MCParser/MCAsmLexer.h"
Public Member Functions | |
| MCAsmLexer (const MCAsmLexer &)=delete | |
| MCAsmLexer & | operator= (const MCAsmLexer &)=delete |
| virtual | ~MCAsmLexer () |
| bool | IsaAltMacroMode () |
| void | SetAltMacroMode (bool AltMacroSet) |
| const AsmToken & | Lex () |
| Consume the next token from the input stream and return it. More... | |
| void | UnLex (AsmToken const &Token) |
| bool | isAtStartOfStatement () |
| virtual StringRef | LexUntilEndOfStatement ()=0 |
| SMLoc | getLoc () const |
| Get the current source location. More... | |
| const AsmToken & | getTok () const |
| Get the current (last) lexed token. More... | |
| const AsmToken | peekTok (bool ShouldSkipSpace=true) |
| Look ahead at the next token to be lexed. More... | |
| virtual size_t | peekTokens (MutableArrayRef< AsmToken > Buf, bool ShouldSkipSpace=true)=0 |
| Look ahead an arbitrary number of tokens. More... | |
| 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) |
| void | setCommentConsumer (AsmCommentConsumer *CommentConsumer) |
Protected Member Functions | |
| MCAsmLexer () | |
| virtual AsmToken | LexToken ()=0 |
| void | SetError (SMLoc errLoc, const std::string &err) |
Protected Attributes | |
| const char * | TokStart = nullptr |
| bool | SkipSpace = true |
| bool | AllowAtInIdentifier |
| bool | IsAtStartOfStatement = true |
| AsmCommentConsumer * | CommentConsumer = nullptr |
| bool | AltMacroMode |
Generic assembler lexer interface, for use by target specific assembly lexers.
Definition at line 149 of file MCAsmLexer.h.
|
protected |
Definition at line 16 of file MCAsmLexer.cpp.
References llvm::AsmToken::Space.
|
delete |
|
virtualdefault |
|
inline |
Definition at line 261 of file MCAsmLexer.h.
References AllowAtInIdentifier.
|
inline |
Get the current error string.
Definition at line 245 of file MCAsmLexer.h.
Referenced by llvm::AsmLexer::peekTokens().
|
inline |
Get the current error location.
Definition at line 240 of file MCAsmLexer.h.
Referenced by llvm::AsmLexer::peekTokens().
|
inline |
Get the kind of current token.
Definition at line 250 of file MCAsmLexer.h.
References llvm::AsmToken::getKind(), and getTok().
| SMLoc MCAsmLexer::getLoc | ( | ) | const |
Get the current source location.
Definition at line 22 of file MCAsmLexer.cpp.
References llvm::SMLoc::getFromPointer(), and TokStart.
Get the current (last) lexed token.
Definition at line 218 of file MCAsmLexer.h.
Referenced by getKind(), llvm::MCAsmParser::getTok(), is(), and isNot().
|
inline |
Check if the current token has kind K.
Definition at line 253 of file MCAsmLexer.h.
References getTok(), and llvm::AsmToken::is().
Referenced by llvm::AsmLexer::LexToken().
|
inline |
Definition at line 179 of file MCAsmLexer.h.
References AltMacroMode.
|
inline |
Definition at line 210 of file MCAsmLexer.h.
References IsAtStartOfStatement.
|
inline |
Check if the current token has kind K.
Definition at line 256 of file MCAsmLexer.h.
References getTok(), and llvm::AsmToken::isNot().
Referenced by expectAbsExpression().
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 191 of file MCAsmLexer.h.
References assert(), llvm::AsmToken::EndOfStatement, IsAtStartOfStatement, LexToken(), and T.
Referenced by llvm::MCAsmParser::Error(), expectAbsExpression(), and llvm::MCAsmParser::parseEOL().
|
protectedpure virtual |
Implemented in llvm::AsmLexer.
Referenced by Lex().
|
pure virtual |
Implemented in llvm::AsmLexer.
|
delete |
Look ahead at the next token to be lexed.
Definition at line 223 of file MCAsmLexer.h.
References assert(), and peekTokens().
|
pure virtual |
|
inline |
Definition at line 262 of file MCAsmLexer.h.
References AllowAtInIdentifier.
|
inline |
Definition at line 183 of file MCAsmLexer.h.
References AltMacroMode.
|
inline |
Definition at line 264 of file MCAsmLexer.h.
References CommentConsumer.
Definition at line 169 of file MCAsmLexer.h.
Referenced by llvm::AsmLexer::peekTokens().
|
inline |
Set whether spaces should be ignored by the lexer.
Definition at line 259 of file MCAsmLexer.h.
References SkipSpace.
Definition at line 205 of file MCAsmLexer.h.
References IsAtStartOfStatement.
Referenced by llvm::AsmLexer::LexToken(), and llvm::MCAsmParser::parseEOL().
|
protected |
Definition at line 160 of file MCAsmLexer.h.
Referenced by llvm::AsmLexer::AsmLexer(), getAllowAtInIdentifier(), and setAllowAtInIdentifier().
|
protected |
Definition at line 164 of file MCAsmLexer.h.
Referenced by IsaAltMacroMode(), and SetAltMacroMode().
|
protected |
Definition at line 162 of file MCAsmLexer.h.
Referenced by setCommentConsumer().
Definition at line 161 of file MCAsmLexer.h.
Referenced by isAtStartOfStatement(), Lex(), and UnLex().
Definition at line 159 of file MCAsmLexer.h.
Referenced by llvm::AsmLexer::LexToken(), llvm::AsmLexer::peekTokens(), and setSkipSpace().
Definition at line 158 of file MCAsmLexer.h.
Referenced by getLoc(), llvm::AsmLexer::LexToken(), llvm::AsmLexer::LexUntilEndOfStatement(), llvm::AsmLexer::peekTokens(), and llvm::AsmLexer::setBuffer().
1.8.6