Top Description Fields Constructors Methods
java_cup

public Class parse_action

extends Object
Class Inheritance
Known Direct Subclasses
java_cup.reduce_action, java_cup.shift_action, java_cup.nonassoc_action

This class serves as the base class for entries in a parse action table. Full entries will either be SHIFT(state_num), REDUCE(production), NONASSOC, or ERROR. Objects of this base class will default to ERROR, while the other three types will be represented by subclasses.
Author
Frank Flannery
Version
last updated: 7/2/96
See Also
java_cup.reduce_action, java_cup.shift_action

Field Summary

Modifier and TypeField and Description
public static final int
ERROR

Constant for action type -- error action.

public static final int
NONASSOC

Constants for action type -- reduce action.

public static final int
REDUCE

Constants for action type -- reduce action.

public static final int
SHIFT

Constant for action type -- shift action.

Constructor Summary

AccessConstructor and Description
public
parse_action()

Simple constructor.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(parse_action other)

Equality test.

public boolean
equals(Object
the reference object with which to compare.
other
)

Overrides java.lang.Object.equals.

Generic equality test.
public int
hashCode()

Overrides java.lang.Object.hashCode.

Compute a hash code.
public int
kind()

Quick access to the type -- base class defaults to error.

public String
toString()

Overrides java.lang.Object.toString.

Convert to string.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

ERRORback to summary
public static final int ERROR

Constant for action type -- error action.

NONASSOCback to summary
public static final int NONASSOC

Constants for action type -- reduce action.

REDUCEback to summary
public static final int REDUCE

Constants for action type -- reduce action.

SHIFTback to summary
public static final int SHIFT

Constant for action type -- shift action.

Constructor Detail

parse_actionback to summary
public parse_action()

Simple constructor.

Method Detail

equalsback to summary
public boolean equals(parse_action other)

Equality test.

equalsback to summary
public boolean equals(Object other)

Overrides java.lang.Object.equals.

Generic equality test.

Parameters
other:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Compute a hash code.

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object.

kindback to summary
public int kind()

Quick access to the type -- base class defaults to error.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Convert to string.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object.