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