The assembly parser consists of one source file,
which contains the arch
ASMParser.cpp
class, inheriting from arch
ASMParser
MCTargetAsmParser
in addition to a second class for holding target-specific
operand information.
Note | |
---|---|
Information about this class can be found in LLVM's documentation at llvm.org/docs/doxygen/html/classllvm_1_1MCTargetAsmParser.html |
The primary class consists of the MatchAndEmitInstruction
function which is called for each instruction to be
parsed, emitting out an internal representation of each instruction as
well as supporting functions which help it parse instruction operands.
It should be noted that the following two lines appear in the class declaration to import functions generated by TableGen which will do most of the heavy lifting in the system.
#define GET_ASSEMBLER_HEADER
#include "arch
GenAsmMatcher.inc"