|
LLVM
3.7.0
|
AsmLexer - Lexer class for assembly files. More...
#include <AsmLexer.h>
Public Member Functions | |
| AsmLexer (const MCAsmInfo &MAI) | |
| ~AsmLexer () override | |
| void | setBuffer (StringRef Buf, const char *ptr=nullptr) |
| StringRef | LexUntilEndOfStatement () override |
| StringRef | LexUntilEndOfLine () |
| const AsmToken | peekTok (bool ShouldSkipSpace=true) override |
| Look ahead at the next token to be lexed. More... | |
| bool | isAtStartOfComment (const char *Ptr) |
| bool | isAtStatementSeparator (const char *Ptr) |
| const MCAsmInfo & | getMAI () const |
Public Member Functions inherited from llvm::MCAsmLexer | |
| virtual | ~MCAsmLexer () |
| const AsmToken & | Lex () |
| Consume the next token from the input stream and return it. More... | |
| SMLoc | getLoc () const |
| Get the current source location. More... | |
| const AsmToken & | getTok () const |
| Get the current (last) lexed token. 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 | |
| AsmToken | LexToken () override |
| LexToken - Read the next token and return its code. More... | |
Protected Member Functions inherited from llvm::MCAsmLexer | |
| MCAsmLexer () | |
| void | SetError (const SMLoc &errLoc, const std::string &err) |
Additional Inherited Members | |
Protected Attributes inherited from llvm::MCAsmLexer | |
| const char * | TokStart |
| bool | SkipSpace |
| bool | AllowAtInIdentifier |
AsmLexer - Lexer class for assembly files.
Definition at line 27 of file AsmLexer.h.
Definition at line 24 of file AsmLexer.cpp.
References llvm::MCAsmLexer::AllowAtInIdentifier, and llvm::MCAsmInfo::getCommentString().
|
override |
Definition at line 30 of file AsmLexer.cpp.
Definition at line 55 of file AsmLexer.h.
Definition at line 461 of file AsmLexer.cpp.
References llvm::MCAsmInfo::getCommentString().
Referenced by LexToken(), and LexUntilEndOfStatement().
Definition at line 474 of file AsmLexer.cpp.
References llvm::MCAsmInfo::getSeparatorString().
Referenced by LexToken(), and LexUntilEndOfStatement().
|
overrideprotectedvirtual |
LexToken - Read the next token and return its code.
Implements llvm::MCAsmLexer.
Definition at line 479 of file AsmLexer.cpp.
References llvm::AsmToken::Amp, llvm::AsmToken::AmpAmp, llvm::AsmToken::At, llvm::AsmToken::BackSlash, llvm::AsmToken::Caret, llvm::AsmToken::Colon, llvm::AsmToken::Comma, llvm::AsmToken::Dollar, llvm::AsmToken::EndOfStatement, llvm::AsmToken::Eof, llvm::AsmToken::Equal, llvm::AsmToken::EqualEqual, llvm::AsmToken::Exclaim, llvm::AsmToken::ExclaimEqual, llvm::MCAsmInfo::getSeparatorString(), llvm::AsmToken::Greater, llvm::AsmToken::GreaterEqual, llvm::AsmToken::GreaterGreater, llvm::AsmToken::Hash, isAtStartOfComment(), isAtStatementSeparator(), llvm::AsmToken::LBrac, llvm::AsmToken::LCurly, llvm::AsmToken::Less, llvm::AsmToken::LessEqual, llvm::AsmToken::LessGreater, llvm::AsmToken::LessLess, llvm::AsmToken::LParen, llvm::AsmToken::Minus, llvm::AsmToken::Percent, llvm::AsmToken::Pipe, llvm::AsmToken::PipePipe, llvm::AsmToken::Plus, llvm::AsmToken::RBrac, llvm::AsmToken::RCurly, llvm::AsmToken::RParen, llvm::MCAsmLexer::SkipSpace, llvm::AsmToken::Space, llvm::AsmToken::Star, llvm::AsmToken::Tilde, and llvm::MCAsmLexer::TokStart.
Referenced by peekTok().
| StringRef AsmLexer::LexUntilEndOfLine | ( | ) |
Definition at line 429 of file AsmLexer.cpp.
References llvm::StringRef::end(), and llvm::MCAsmLexer::TokStart.
|
overridevirtual |
Implements llvm::MCAsmLexer.
Definition at line 417 of file AsmLexer.cpp.
References llvm::StringRef::end(), isAtStartOfComment(), isAtStatementSeparator(), and llvm::MCAsmLexer::TokStart.
Look ahead at the next token to be lexed.
Implements llvm::MCAsmLexer.
Definition at line 439 of file AsmLexer.cpp.
References llvm::MCAsmLexer::getErr(), llvm::MCAsmLexer::getErrLoc(), LexToken(), llvm::MCAsmLexer::SetError(), llvm::MCAsmLexer::SkipSpace, and llvm::MCAsmLexer::TokStart.
Definition at line 33 of file AsmLexer.cpp.
References llvm::StringRef::begin(), and llvm::MCAsmLexer::TokStart.
1.8.6