LLVM: llvm::AsmLexer Class Reference (original) (raw)
#include "[llvm/MC/MCParser/AsmLexer.h](AsmLexer%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| LLVM_ABI | AsmLexer (const MCAsmInfo &MAI) |
| AsmLexer (const AsmLexer &)=delete | |
| AsmLexer & | operator= (const AsmLexer &)=delete |
| const AsmToken & | Lex () |
| Consume the next token from the input stream and return it. | |
| void | UnLex (AsmToken const &Token) |
| bool | justConsumedEOL () |
| LLVM_ABI StringRef | LexUntilEndOfStatement () |
| SMLoc | getLoc () const |
| Get the current source location. | |
| const AsmToken & | getTok () const |
| Get the current (last) lexed token. | |
| const AsmToken | peekTok (bool ShouldSkipSpace=true) |
| Look ahead at the next token to be lexed. | |
| LLVM_ABI size_t | peekTokens (MutableArrayRef< AsmToken > Buf, bool ShouldSkipSpace=true) |
| Look ahead an arbitrary number of tokens. | |
| SMLoc | getErrLoc () |
| Get the current error location. | |
| const std::string & | getErr () |
| Get the current error string. | |
| AsmToken::TokenKind | getKind () const |
| Get the kind of current token. | |
| bool | is (AsmToken::TokenKind K) const |
| Check if the current token has kind K. | |
| bool | isNot (AsmToken::TokenKind K) const |
| Check if the current token has kind K. | |
| void | setSkipSpace (bool val) |
| Set whether spaces should be ignored by the lexer. | |
| bool | getAllowAtInIdentifier () |
| void | setAllowAtInIdentifier (bool v) |
| void | setAllowHashInIdentifier (bool V) |
| void | setCommentConsumer (AsmCommentConsumer *CommentConsumer) |
| void | setLexMasmIntegers (bool V) |
| Set whether to lex masm-style binary (e.g., 0b1101) and radix-specified literals (e.g., 0ABCh [hex], 576t [decimal], 77o [octal], 1101y [binary]). | |
| void | useMasmDefaultRadix (bool V) |
| Set whether to use masm-style default-radix integer literals. | |
| unsigned | getMasmDefaultRadix () const |
| void | setMasmDefaultRadix (unsigned Radix) |
| void | setLexMasmHexFloats (bool V) |
| Set whether to lex masm-style hex float literals, such as 3f800000r. | |
| void | setLexMasmStrings (bool V) |
| Set whether to lex masm-style string literals, such as 'Can''t find file' and "This ""value"" not found". | |
| void | setLexMotorolaIntegers (bool V) |
| Set whether to lex Motorola-style integer literals, such as $deadbeef or %01010110. | |
| void | setLexHLASMIntegers (bool V) |
| Set whether to lex HLASM-flavour integers. For now this is only [0-9]*. | |
| void | setLexHLASMStrings (bool V) |
| Set whether to "lex" HLASM-flavour character and string literals. | |
| LLVM_ABI void | setBuffer (StringRef Buf, const char *ptr=nullptr, bool EndStatementAtEOF=true) |
| Set buffer to be lexed. | |
| const MCAsmInfo & | getMAI () const |
Definition at line 42 of file AsmLexer.h.
◆ AsmLexer() [1/2]
◆ AsmLexer() [2/2]
◆ getAllowAtInIdentifier()
| bool llvm::AsmLexer::getAllowAtInIdentifier ( ) | inline |
|---|
◆ getErr()
| const std::string & llvm::AsmLexer::getErr ( ) | inline |
|---|
◆ getErrLoc()
| SMLoc llvm::AsmLexer::getErrLoc ( ) | inline |
|---|
◆ getKind()
◆ getLoc()
| SMLoc llvm::AsmLexer::getLoc ( ) const | inline |
|---|
◆ getMAI()
◆ getMasmDefaultRadix()
| unsigned llvm::AsmLexer::getMasmDefaultRadix ( ) const | inline |
|---|
◆ getTok()
◆ is()
◆ isNot()
◆ justConsumedEOL()
| bool llvm::AsmLexer::justConsumedEOL ( ) | inline |
|---|
◆ Lex()
◆ LexUntilEndOfStatement()
| StringRef AsmLexer::LexUntilEndOfStatement | ( | ) |
|---|
◆ operator=()
◆ peekTok()
◆ peekTokens()
◆ setAllowAtInIdentifier()
| void llvm::AsmLexer::setAllowAtInIdentifier ( bool v) | inline |
|---|
◆ setAllowHashInIdentifier()
| void llvm::AsmLexer::setAllowHashInIdentifier ( bool V) | inline |
|---|
◆ setBuffer()
Set buffer to be lexed.
Buf must be NULL-terminated. NULL terminator must reside at Buf.end(). ptr if provided must be in range [Buf.begin(), buf.end()] or NULL. Specifies where lexing of buffer should begin. EndStatementAtEOF specifies whether AsmToken::EndOfStatement should be returned upon reaching end of buffer.
Definition at line 120 of file AsmLexer.cpp.
References assert(), and llvm::StringRef::end().
◆ setCommentConsumer()
◆ setLexHLASMIntegers()
| void llvm::AsmLexer::setLexHLASMIntegers ( bool V) | inline |
|---|
Set whether to lex HLASM-flavour integers. For now this is only [0-9]*.
Definition at line 187 of file AsmLexer.h.
◆ setLexHLASMStrings()
| void llvm::AsmLexer::setLexHLASMStrings ( bool V) | inline |
|---|
Set whether to "lex" HLASM-flavour character and string literals.
For now, setting this option to true, will disable lexing for character and string literals.
Definition at line 192 of file AsmLexer.h.
◆ setLexMasmHexFloats()
| void llvm::AsmLexer::setLexMasmHexFloats ( bool V) | inline |
|---|
Set whether to lex masm-style hex float literals, such as 3f800000r.
Definition at line 176 of file AsmLexer.h.
◆ setLexMasmIntegers()
| void llvm::AsmLexer::setLexMasmIntegers ( bool V) | inline |
|---|
Set whether to lex masm-style binary (e.g., 0b1101) and radix-specified literals (e.g., 0ABCh [hex], 576t [decimal], 77o [octal], 1101y [binary]).
Definition at line 166 of file AsmLexer.h.
◆ setLexMasmStrings()
| void llvm::AsmLexer::setLexMasmStrings ( bool V) | inline |
|---|
Set whether to lex masm-style string literals, such as 'Can''t find file' and "This ""value"" not found".
Definition at line 180 of file AsmLexer.h.
◆ setLexMotorolaIntegers()
| void llvm::AsmLexer::setLexMotorolaIntegers ( bool V) | inline |
|---|
Set whether to lex Motorola-style integer literals, such as $deadbeef or %01010110.
Definition at line 184 of file AsmLexer.h.
◆ setMasmDefaultRadix()
| void llvm::AsmLexer::setMasmDefaultRadix ( unsigned Radix) | inline |
|---|
◆ setSkipSpace()
| void llvm::AsmLexer::setSkipSpace ( bool val) | inline |
|---|
Set whether spaces should be ignored by the lexer.
Definition at line 153 of file AsmLexer.h.
◆ UnLex()
◆ useMasmDefaultRadix()
| void llvm::AsmLexer::useMasmDefaultRadix ( bool V) | inline |
|---|
Set whether to use masm-style default-radix integer literals.
If disabled, assume decimal unless prefixed (e.g., 0x2c [hex], 077 [octal]).
Definition at line 170 of file AsmLexer.h.
The documentation for this class was generated from the following files:
- include/llvm/MC/MCParser/AsmLexer.h
- lib/MC/MCParser/AsmLexer.cpp