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. The extension should use the AsmParser i...
MCTargetAsmParser - Generic interface to target specific assembly parsers.
const AsmToken & getTok()
getTok - Get the current (last) lexed token.
bool TokError(const Twine &Msg, ArrayRef< SMRange > Ranges=None)
Report an error at the current lexer location.
AsmToken - Target independent representation for an assembler token.
virtual bool parseExpression(const MCExpr *&Res, SMLoc &EndLoc)=0
const AsmToken & getTok()
getTok - Get the current AsmToken from the stream.
virtual MCAsmLexer & getLexer()=0
virtual bool Error(SMLoc L, const Twine &Msg, ArrayRef< SMRange > Ranges=None)=0
virtual void dump() const
dump - Print to the debug stream.
raw_ostream & dbgs()
dbgs - Return a circular-buffered debug stream.
void setTargetParser(MCTargetAsmParser &P)
Represents a location in source code.