java_cup

Class parse_action

public class parse_action extends Object

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.

Version: last updated: 7/2/96

Author: Frank Flannery

See Also: reduce_action shift_action

Field Summary
static intERROR
Constant for action type -- error action.
static intNONASSOC
Constants for action type -- reduce action.
static intREDUCE
Constants for action type -- reduce action.
static intSHIFT
Constant for action type -- shift action.
Constructor Summary
parse_action()
Simple constructor.
Method Summary
booleanequals(parse_action other)
Equality test.
booleanequals(Object other)
Generic equality test.
inthashCode()
Compute a hash code.
intkind()
Quick access to the type -- base class defaults to error.
StringtoString()
Convert to string.

Field Detail

ERROR

public static final int ERROR
Constant for action type -- error action.

NONASSOC

public static final int NONASSOC
Constants for action type -- reduce action.

REDUCE

public static final int REDUCE
Constants for action type -- reduce action.

SHIFT

public static final int SHIFT
Constant for action type -- shift action.

Constructor Detail

parse_action

public parse_action()
Simple constructor.

Method Detail

equals

public boolean equals(parse_action other)
Equality test.

equals

public boolean equals(Object other)
Generic equality test.

hashCode

public int hashCode()
Compute a hash code.

kind

public int kind()
Quick access to the type -- base class defaults to error.

toString

public String toString()
Convert to string.