Package ghidra.pcode.exec
Class SleighProgramCompiler.ErrorCollectingPcodeParser
java.lang.Object
ghidra.pcodeCPort.slgh_compile.PcodeCompile
ghidra.program.model.lang.PcodeParser
ghidra.pcode.exec.SleighProgramCompiler.ErrorCollectingPcodeParser
- Enclosing class:
SleighProgramCompiler
A p-code parser that provides programmatic access to error diagnostics.
-
Nested Class Summary
Nested classes/interfaces inherited from class ghidra.program.model.lang.PcodeParser
PcodeParser.PcodeTranslate -
Field Summary
Fields inherited from class ghidra.pcodeCPort.slgh_compile.PcodeCompile
log, noplist -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompilePcode(String pcodeStatements, String srcFile, int srcLine) Compile pcode semantic statements.voidreportError(Location location, String msg) voidreportWarning(Location location, String msg) Methods inherited from class ghidra.program.model.lang.PcodeParser
addOperand, addSymbol, allocateTemp, clearSymbols, createCrossBuild, createMacroUse, finalNamedSection, findSymbol, firstNamedSection, getConstantSpace, getDefaultSpace, getNextTempOffset, getSleigh, getUniqueSpace, newSectionSymbol, nextNamedSection, recordNop, standaloneSection, translateConstructTpl, translateConstTpl, translateHandleTpl, translateOpTpl, translateVarnodeTplMethods inherited from class ghidra.pcodeCPort.slgh_compile.PcodeCompile
addressOf, appendOp, assignBitRange, buildTemporary, buildTruncatedVarnode, createBitRange, createLoad, createOp, createOp, createOpConst, createOpNoOut, createOpNoOut, createOpOut, createOpOutUnary, createStore, createUserOp, createUserOpNoOut, createVariadic, defineLabel, entry, fillinZero, findInternalFunction, getErrors, getWarnings, isInternalFunction, matchSize, newLocalDefinition, newLocalDefinition, newOutput, newOutput, placeLabel, propagateSize, resetLabelCount, setEnforceLocalKey, setResultStarVarnode, setResultVarnode
-
Constructor Details
-
ErrorCollectingPcodeParser
-
-
Method Details
-
reportError
- Overrides:
reportErrorin classghidra.pcodeCPort.slgh_compile.PcodeCompile
-
reportWarning
- Overrides:
reportWarningin classghidra.pcodeCPort.slgh_compile.PcodeCompile
-
compilePcode
public ConstructTpl compilePcode(String pcodeStatements, String srcFile, int srcLine) throws SleighException Description copied from class:PcodeParserCompile pcode semantic statements.- Overrides:
compilePcodein classPcodeParser- Parameters:
pcodeStatements- is the raw source to parsesrcFile- source filename from which pcodeStatements came (srcLine- line number in srcFile corresponding to pcodeStatements- Returns:
- ConstructTpl. A null may be returned or an exception thrown if parsing/compiling fails (see application log for errors).
- Throws:
SleighException- pcode compile error
-