Package java_cup
Class parse_action_row
java.lang.Object
java_cup.parse_action_row
This class represents one row (corresponding to one machine state) of the
parse action table.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static int
Number of columns (terminals) in every row.int
Default (reduce) action for this row.protected static int[]
Table of reduction counts (reused by compute_default()).Actual action entries for the row. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Compute the default (reduce) action for this row and store it in default_reduce.static int
size()
Number of columns (terminals) in every row.
-
Field Details
-
_size
protected static int _sizeNumber of columns (terminals) in every row. -
reduction_count
protected static int[] reduction_countTable of reduction counts (reused by compute_default()). -
under_term
Actual action entries for the row. -
default_reduce
public int default_reduceDefault (reduce) action for this row. -1 will represent default of error.
-
-
Constructor Details
-
parse_action_row
public parse_action_row()Simple constructor. Note: this should not be used until the number of terminals in the grammar has been established.
-
-
Method Details
-
size
public static int size()Number of columns (terminals) in every row. -
compute_default
public void compute_default()Compute the default (reduce) action for this row and store it in default_reduce. In the case of non-zero default we will have the effect of replacing all errors by that reduction. This may cause us to do erroneous reduces, but will never cause us to shift past the point of the error and never cause an incorrect parse. -1 will be used to encode the fact that no reduction can be used as a default (in which case error will be used).
-