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

Direct Known Subclasses:
  `DebuggerPcodeUtils.LabelBoundPcodeParser`

Enclosing class:
  `SleighProgramCompiler`

public static class SleighProgramCompiler.ErrorCollectingPcodeParser extends PcodeParser
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
  Constructor
  Description
  `ErrorCollectingPcodeParser(SleighLanguage language)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ConstructTpl`
  `compilePcode(String pcodeStatements, String srcFile, int srcLine)`
  Compile pcode semantic statements.
  `void`
  `reportError(Location location, String msg)`
  `void`
  `reportWarning(Location location, String msg)`

  ### Methods inherited from class ghidra.program.model.lang.PcodeParser

  `addOperand, addSymbol, allocateTemp, clearSymbols, createCrossBuild, createMacroUse, enterSection, finalNamedSection, findSymbol, firstNamedSection, getConstantSpace, getDefaultSpace, getNextTempOffset, getSleigh, getUniqueSpace, newSectionSymbol, nextNamedSection, recordNop, standaloneSection, translateConstructTpl, translateConstTpl, translateHandleTpl, translateOpTpl, translateVarnodeTpl`

  ### Methods 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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ErrorCollectingPcodeParser

    public ErrorCollectingPcodeParser(SleighLanguage language)

- ## Method Details

  - ### reportError

    public void reportError(Location location, String msg)
    Overrides:
      `reportError` in class `ghidra.pcodeCPort.slgh_compile.PcodeCompile`

  - ### reportWarning

    public void reportWarning(Location location, String msg)
    Overrides:
      `reportWarning` in class `ghidra.pcodeCPort.slgh_compile.PcodeCompile`

  - ### compilePcode

    public ConstructTpl compilePcode(String pcodeStatements, String srcFile, int srcLine) throws SleighException
    Description copied from class: `PcodeParser`
    Compile pcode semantic statements.
    Overrides:
      `compilePcode` in class `PcodeParser`
    Parameters:
      `pcodeStatements` - is the raw source to parse
      `srcFile` - 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