Top Description Fields Constructors Methods
java_cup

public Class parse_action_table

extends Object
Class Inheritance
Imports
java.util.Enumeration

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.
Author
Scott Hudson
Version
last updated: 11/25/95
See Also
java_cup.parse_action, java_cup.parse_action_row

Field Summary

Modifier and TypeField and Description
protected int
_num_states

How many rows/states are in the machine/table.

public parse_action_row[]
under_state

Actual array of rows, one per state.

Constructor Summary

AccessConstructor and Description
public
parse_action_table()

Simple constructor.

Method Summary

Modifier and TypeMethod and Description
public void
check_reductions()

Check the table to ensure that all productions have been reduced.

public int
num_states()

How many rows/states are in the machine/table.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_num_statesback to summary
protected int _num_states

How many rows/states are in the machine/table.

under_stateback to summary
public parse_action_row[] under_state

Actual array of rows, one per state.

Constructor Detail

parse_action_tableback to summary
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 Detail

check_reductionsback to summary
public void check_reductions() throws internal_error

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.

num_statesback to summary
public int num_states()

How many rows/states are in the machine/table.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.