Package java_cup
Class parse_action_table
- java.lang.Object
-
- java_cup.parse_action_table
-
public class parse_action_table extends java.lang.ObjectThis class represents the complete "action" table of the parser. It has one row for each state in the parse machine, and a column for each terminal symbol. Each entry in the table represents a shift, reduce, or an error.- Version:
- last updated: 11/25/95
- Author:
- Scott Hudson
- See Also:
parse_action,parse_action_row
-
-
Field Summary
Fields Modifier and Type Field Description protected int_num_statesHow many rows/states are in the machine/table.parse_action_row[]under_stateActual array of rows, one per state.
-
Constructor Summary
Constructors Constructor Description parse_action_table()Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheck_reductions()Check the table to ensure that all productions have been reduced.intnum_states()How many rows/states are in the machine/table.java.lang.StringtoString()
-
-
-
Field Detail
-
_num_states
protected int _num_states
How many rows/states are in the machine/table.
-
under_state
public parse_action_row[] under_state
Actual array of rows, one per state.
-
-
Method Detail
-
num_states
public int num_states()
How many rows/states are in the machine/table.
-
check_reductions
public void check_reductions() throws internal_errorCheck the table to ensure that all productions have been reduced. Issue a warning message (to System.err) for each production that is never reduced.- Throws:
internal_error
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-