Package ghidra.app.plugin.assembler.sleigh.sem

# Class AssemblyHiddenConstructStateGenerator

java.lang.Object
ghidra.app.plugin.assembler.sleigh.sem.AbstractAssemblyStateGenerator<AssemblyParseBranch>
ghidra.app.plugin.assembler.sleigh.sem.AssemblyConstructStateGenerator
ghidra.app.plugin.assembler.sleigh.sem.AssemblyHiddenConstructStateGenerator

public class AssemblyHiddenConstructStateGenerator extends AssemblyConstructStateGenerator
The generator of `AssemblyConstructState` for a hidden sub-table operand

In short, this exhausts all possible constructors in the given sub-table. For well-designed languages, such exhaustion produces a very small set of possibilities. In general, hidden sub-table operands are a bad idea.

- ## Nested Class Summary

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

  `AbstractAssemblyStateGenerator.GeneratorContext`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final SubtableSymbol`
  `subtableSym`

  ### Fields inherited from class ghidra.app.plugin.assembler.sleigh.sem.AbstractAssemblyStateGenerator

  `DBG, fromLeft, node, resolver`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AssemblyHiddenConstructStateGenerator(AssemblyTreeResolver resolver, SubtableSymbol subtableSym, AssemblyResolvedPatterns fromLeft)`
  Construct the hidden sub-table operand state generator

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Stream<AssemblyGeneratedPrototype>`
  `generate(AbstractAssemblyStateGenerator.GeneratorContext gc)`
  Generate states
  `protected List<AssemblyParseTreeNode>`
  `orderOpNodes(AssemblyConstructorSemantic sem)`
  Arrange the branch's (mnemonic) children according to the machine-code production

  ### Methods inherited from class ghidra.app.plugin.assembler.sleigh.sem.AssemblyConstructStateGenerator

  `applyConstructor, applyOperands, applyRemainingOperands`

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

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

- ## Field Details

  - ### subtableSym

    protected final SubtableSymbol subtableSym

- ## Constructor Details

  - ### AssemblyHiddenConstructStateGenerator

    public AssemblyHiddenConstructStateGenerator(AssemblyTreeResolver resolver, SubtableSymbol subtableSym, AssemblyResolvedPatterns fromLeft)
    Construct the hidden sub-table operand state generator
    Parameters:
      `resolver` - the resolver
      `subtableSym` -
      `fromLeft` - the accumulated patterns from the left sibling or the parent

- ## Method Details

  - ### generate

    public Stream<AssemblyGeneratedPrototype> generate(AbstractAssemblyStateGenerator.GeneratorContext gc)
    Description copied from class: `AbstractAssemblyStateGenerator`
    Generate states
    Overrides:
      `generate` in class `AssemblyConstructStateGenerator`
    Parameters:
      `gc` - the generator context for this node
    Returns:
      the stream of prototypes, each including accumulated patterns

  - ### orderOpNodes

    protected List<AssemblyParseTreeNode> orderOpNodes(AssemblyConstructorSemantic sem)
    Description copied from class: `AssemblyConstructStateGenerator`
    Arrange the branch's (mnemonic) children according to the machine-code production

    This orders the parsed children so that each is readily paired to its operand as given by `Constructor.getOperand(int)`.

    Overrides:
      `orderOpNodes` in class `AssemblyConstructStateGenerator`
    Parameters:
      `sem` - the SLEIGH constructor whose machine-code production to consider
    Returns:
      the children arranged in constructor operand order