Go to the documentation of this file.
9 #ifndef LLVM_MC_MCPARSER_MCASMLEXER_H
10 #define LLVM_MC_MCPARSER_MCASMLEXER_H
83 CurTok.
erase(CurTok.begin());
88 CurTok.
insert(CurTok.begin(),
T);
90 return CurTok.front();
95 CurTok.
insert(CurTok.begin(), Token);
115 size_t ReadCount =
peekTokens(Buf, ShouldSkipSpace);
125 bool ShouldSkipSpace =
true) = 0;
191 #endif // LLVM_MC_MCPARSER_MCASMLEXER_H
This is an optimization pass for GlobalISel generic memory operations.
iterator erase(const_iterator CI)
bool is(TokenKind K) const
Generic assembler lexer interface, for use by target specific assembly lexers.
const AsmToken peekTok(bool ShouldSkipSpace=true)
Look ahead at the next token to be lexed.
void setAllowHashInIdentifier(bool V)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
const AsmToken & getTok() const
Get the current (last) lexed token.
virtual AsmToken LexToken()=0
const AsmToken & Lex()
Consume the next token from the input stream and return it.
bool is(AsmToken::TokenKind K) const
Check if the current token has kind K.
Target independent representation for an assembler token.
bool IsAtStartOfStatement
bool isAtStartOfStatement()
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
Represents a location in source code.
void setLexHLASMIntegers(bool V)
Set whether to lex HLASM-flavour integers. For now this is only [0-9]*.
MCAsmLexer & operator=(const MCAsmLexer &)=delete
TokenKind getKind() const
const std::string & getErr()
Get the current error string.
SMLoc getErrLoc()
Get the current error location.
The initial backend is deliberately restricted to z10 We should add support for later architectures at some point If an asm ties an i32 r result to an i64 the input will be treated as an leaving the upper bits uninitialised For i64 store i32 val
void useMasmDefaultRadix(bool V)
Set whether to use masm-style default-radix integer literals.
void setCommentConsumer(AsmCommentConsumer *CommentConsumer)
SMLoc getLoc() const
Get the current source location.
void setLexMotorolaIntegers(bool V)
Set whether to lex Motorola-style integer literals, such as $deadbeef or %01010110.
bool AllowHashInIdentifier
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
StringRef - Represent a constant reference to a string, i.e.
virtual StringRef LexUntilEndOfStatement()=0
AsmToken::TokenKind getKind() const
Get the kind of current token.
void setLexMasmHexFloats(bool V)
Set whether to lex masm-style hex float literals, such as 3f800000r.
AsmCommentConsumer * CommentConsumer
bool isNot(TokenKind K) const
void setMasmDefaultRadix(unsigned Radix)
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.
unsigned getMasmDefaultRadix() const
void setLexHLASMStrings(bool V)
Set whether to "lex" HLASM-flavour character and string literals.
virtual size_t peekTokens(MutableArrayRef< AsmToken > Buf, bool ShouldSkipSpace=true)=0
Look ahead an arbitrary number of tokens.
void setAllowAtInIdentifier(bool v)
void UnLex(AsmToken const &Token)
void SetError(SMLoc errLoc, const std::string &err)
bool getAllowAtInIdentifier()
void setLexMasmIntegers(bool V)
Set whether to lex masm-style binary (e.g., 0b1101) and radix-specified literals (e....
iterator insert(iterator I, T &&Elt)
void setLexMasmStrings(bool V)
Set whether to lex masm-style string literals, such as 'Can''t find file' and "This ""value"" not fou...