Class AssemblyParseTransitionTable

java.lang.Object
ghidra.app.plugin.assembler.sleigh.parse.AssemblyParseTransitionTable

public class AssemblyParseTransitionTable extends Object
The transition table defining an LR(0) parsing machine
  • Constructor Details

    • AssemblyParseTransitionTable

      public AssemblyParseTransitionTable()
  • Method Details

    • put

      public Integer put(int fromState, AssemblySymbol next, int newState)
      Put an entry into the state machine

      NOTE: Generally, if this returns non-null, something is probably wrong with your LR(0) machine generator

      Parameters:
      fromState - the source state
      next - the symbol that is matched
      newState - the destination state
      Returns:
      the previous value for newState
    • get

      public Integer get(int fromState, AssemblySymbol next)
      Get an entry from the state machine
      Parameters:
      fromState - the source state
      next - the symbol that has been matched
      Returns:
      the destination state
    • forEach

      public void forEach(Consumer<TableEntry<Integer>> consumer)
      Traverse every entry in the table, invoking Consumer.accept(Object) on each
      Parameters:
      consumer - the callback