Package java_cup

Class parse_reduce_table


  • public class parse_reduce_table
    extends java.lang.Object
    This class represents the complete "reduce-goto" table of the parser. It has one row for each state in the parse machines, and a column for each terminal symbol. Each entry contains a state number to shift to as the last step of a reduce.
    Version:
    last updated: 11/25/95
    Author:
    Scott Hudson
    See Also:
    parse_reduce_row
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int _num_states
      How many rows/states in the machine/table.
      parse_reduce_row[] under_state
      Actual array of rows, one per state
    • Constructor Summary

      Constructors 
      Constructor Description
      parse_reduce_table()
      Simple constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int num_states()
      How many rows/states in the machine/table.
      java.lang.String toString()
      Convert to a string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • _num_states

        protected int _num_states
        How many rows/states in the machine/table.
      • under_state

        public parse_reduce_row[] under_state
        Actual array of rows, one per state
    • Constructor Detail

      • parse_reduce_table

        public parse_reduce_table()
        Simple constructor. Note: all terminals, non-terminals, and productions must already have been entered, and the viable prefix recognizer should have been constructed before this is called.
    • Method Detail

      • num_states

        public int num_states()
        How many rows/states in the machine/table.
      • toString

        public java.lang.String toString()
        Convert to a string.
        Overrides:
        toString in class java.lang.Object