27 assert(!TargetParser &&
"Target parser is already initialized!");
47 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
48 dbgs() <<
" " << *
this;
virtual void Initialize(MCAsmParser &Parser)
Initialize the extension for parsing using the given Parser.
MCTargetAsmParser - Generic interface to target specific assembly parsers.
const AsmToken & getTok() const
Get the current (last) lexed token.
bool TokError(const Twine &Msg, ArrayRef< SMRange > Ranges=None)
Report an error at the current lexer location.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Base class for the full range of assembler expressions which are needed for parsing.
Target independent representation for an assembler token.
virtual bool parseExpression(const MCExpr *&Res, SMLoc &EndLoc)=0
Parse an arbitrary expression.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
const AsmToken & getTok() const
Get the current AsmToken from the stream.
virtual MCAsmLexer & getLexer()=0
virtual bool Error(SMLoc L, const Twine &Msg, ArrayRef< SMRange > Ranges=None)=0
Emit an error at the location L, with the message Msg.
virtual void dump() const
dump - Print to the debug stream.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
void setTargetParser(MCTargetAsmParser &P)
Represents a location in source code.