1. package com.sun.java_cup.internal;
  2. /** This class represents one row (corresponding to one machine state) of the
  3. * reduce-goto parse table.
  4. */
  5. public class parse_reduce_row {
  6. /*-----------------------------------------------------------*/
  7. /*--- Constructor(s) ----------------------------------------*/
  8. /*-----------------------------------------------------------*/
  9. /** Simple constructor. Note: this should not be used until the number
  10. * of terminals in the grammar has been established.
  11. */
  12. public parse_reduce_row()
  13. {
  14. /* make sure the size is set */
  15. if (_size <= 0 ) _size = non_terminal.number();
  16. /* allocate the array */
  17. under_non_term = new lalr_state[size()];
  18. }
  19. /*-----------------------------------------------------------*/
  20. /*--- (Access to) Static (Class) Variables ------------------*/
  21. /*-----------------------------------------------------------*/
  22. /** Number of columns (non terminals) in every row. */
  23. protected static int _size = 0;
  24. /** Number of columns (non terminals) in every row. */
  25. public static int size() {return _size;}
  26. /*-----------------------------------------------------------*/
  27. /*--- (Access to) Instance Variables ------------------------*/
  28. /*-----------------------------------------------------------*/
  29. /** Actual entries for the row. */
  30. public lalr_state under_non_term[];
  31. }