Top Description Fields Constructors Methods
java_cup

public Class parse_action_row

extends Object
Class Inheritance

This class represents one row (corresponding to one machine state) of the parse action table.

Field Summary

Modifier and TypeField and Description
protected static int
_size

Number of columns (terminals) in every row.

public int
default_reduce

Default (reduce) action for this row.

protected static int[]
reduction_count

Table of reduction counts (reused by compute_default()).

public parse_action[]
under_term

Actual action entries for the row.

Constructor Summary

AccessConstructor and Description
public
parse_action_row()

Simple constructor.

Method Summary

Modifier and TypeMethod and Description
public void
compute_default()

Compute the default (reduce) action for this row and store it in default_reduce.

public static int
size()

Number of columns (terminals) in every row.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_sizeback to summary
protected static int _size

Number of columns (terminals) in every row.

default_reduceback to summary
public int default_reduce

Default (reduce) action for this row. -1 will represent default of error.

reduction_countback to summary
protected static int[] reduction_count

Table of reduction counts (reused by compute_default()).

under_termback to summary
public parse_action[] under_term

Actual action entries for the row.

Constructor Detail

parse_action_rowback to summary
public parse_action_row()

Simple constructor.

Note

this should not be used until the number of terminals in the grammar has been established.

Method Detail

compute_defaultback to summary
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).

sizeback to summary
public static int size()

Number of columns (terminals) in every row.