Package java_cup
Class parse_action_table
java.lang.Object
java_cup.parse_action_table
This 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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
How many rows/states are in the machine/table.Actual array of rows, one per state. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Check the table to ensure that all productions have been reduced.int
How many rows/states are in the machine/table.toString()
-
Field Details
-
_num_states
protected int _num_statesHow many rows/states are in the machine/table. -
under_state
Actual array of rows, one per state.
-
-
Constructor Details
-
parse_action_table
public parse_action_table()Simple constructor. 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 Details
-
num_states
public int num_states()How many rows/states are in the machine/table. -
check_reductions
Check 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
-