Class AssemblyParseTransitionTable


  • public class AssemblyParseTransitionTable
    extends java.lang.Object
    The transition table defining an LR(0) parsing machine
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void forEach​(java.util.function.Consumer<TableEntry<java.lang.Integer>> consumer)
      Traverse every entry in the table, invoking Consumer.accept(Object) on each
      java.lang.Integer get​(int fromState, AssemblySymbol next)
      Get an entry from the state machine
      java.lang.Integer put​(int fromState, AssemblySymbol next, int newState)
      Put an entry into the state machine
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AssemblyParseTransitionTable

        public AssemblyParseTransitionTable()
    • Method Detail

      • put

        public java.lang.Integer put​(int fromState,
                                     AssemblySymbol next,
                                     int newState)
        Put an entry into the state machine
        Parameters:
        fromState - the source state
        next - the symbol that is matched
        newState - the destination state
        Returns:
        the previous value for newState
      • get

        public java.lang.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​(java.util.function.Consumer<TableEntry<java.lang.Integer>> consumer)
        Traverse every entry in the table, invoking Consumer.accept(Object) on each
        Parameters:
        consumer - the callback