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