Package ghidra.app.plugin.assembler.sleigh

# Class SleighAssembler

java.lang.Object
ghidra.app.plugin.assembler.sleigh.AbstractSleighAssembler<AssemblyResolvedPatterns>
ghidra.app.plugin.assembler.sleigh.SleighAssembler

All Implemented Interfaces:
  `Assembler`, `GenericAssembler<AssemblyResolvedPatterns>`

public class SleighAssembler extends AbstractSleighAssembler<AssemblyResolvedPatterns> implements Assembler
An `Assembler` for a `SleighLanguage`.

For documentation on how the SLEIGH assembler works, see `SleighAssemblerBuilder`. To use the assembler, please use `Assemblers.getAssembler(Program)` or similar.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class ghidra.app.plugin.assembler.sleigh.AbstractSleighAssembler

  `AbstractSleighAssembler.ListenerForSymbolsRefresh`

- ## Field Summary

  ### Fields inherited from class ghidra.app.plugin.assembler.sleigh.AbstractSleighAssembler

  `ctxGraph, defaultContext, factory, lang, listing, lock, memory, parser, program, selector, symbols`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `SleighAssembler(AbstractAssemblyResolutionFactory<AssemblyResolvedPatterns,?> factory, AssemblySelector selector, SleighLanguage lang, AssemblyParser parser, AssemblyDefaultContext defaultContext, AssemblyContextGraph ctxGraph)`
  Construct a SleighAssembler.
  `protected`
  `SleighAssembler(AbstractAssemblyResolutionFactory<AssemblyResolvedPatterns,?> factory, AssemblySelector selector, Program program, AssemblyParser parser, AssemblyDefaultContext defaultContext, AssemblyContextGraph ctxGraph)`
  Construct a SleighAssembler.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected AssemblyTreeResolver`
  `newResolver(Address at, AssemblyParseBranch tree, AssemblyPatternBlock ctx)`

  ### Methods inherited from class ghidra.app.plugin.assembler.sleigh.AbstractSleighAssembler

  `assemble, assembleLine, assembleLine, getContextAt, getLanguage, getNumericSymbols, getProgram, parseLine, patchProgram, patchProgram, resolveLine, resolveLine, resolveTree, resolveTree`

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

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

  ### Methods inherited from interface ghidra.app.plugin.assembler.GenericAssembler

  `assemble, assembleLine, assembleLine, getContextAt, getLanguage, getProgram, parseLine, patchProgram, patchProgram, resolveLine, resolveLine, resolveTree, resolveTree`

- ## Constructor Details

  - ### SleighAssembler

    protected SleighAssembler(AbstractAssemblyResolutionFactory<AssemblyResolvedPatterns,?> factory, AssemblySelector selector, Program program, AssemblyParser parser, AssemblyDefaultContext defaultContext, AssemblyContextGraph ctxGraph)
    Construct a SleighAssembler.
    Parameters:
      `selector` - a method of selecting one result from many
      `program` - the program to bind to (must have same language as parser)
      `parser` - the parser for the SLEIGH language
      `defaultContext` - the default context for the language
      `ctxGraph` - the context graph

  - ### SleighAssembler

    protected SleighAssembler(AbstractAssemblyResolutionFactory<AssemblyResolvedPatterns,?> factory, AssemblySelector selector, SleighLanguage lang, AssemblyParser parser, AssemblyDefaultContext defaultContext, AssemblyContextGraph ctxGraph)
    Construct a SleighAssembler.

    NOTE: This variant does not permit `AbstractSleighAssembler.assemble(Address, String...)`.

    Parameters:
      `selector` - a method of selecting one result from many
      `lang` - the SLEIGH language (must be same as to create the parser)
      `parser` - the parser for the SLEIGH language
      `defaultContext` - the default context for the language
      `ctxGraph` - the context graph

- ## Method Details

  - ### newResolver

    protected AssemblyTreeResolver newResolver(Address at, AssemblyParseBranch tree, AssemblyPatternBlock ctx)
    Specified by:
      `newResolver` in class `AbstractSleighAssembler<AssemblyResolvedPatterns>`