java_cup

Class production_part

public abstract class production_part extends Object

This class represents one part (either a symbol or an action) of a production. In this base class it contains only an optional label string that the user can use to refer to the part within actions.

This is an abstract class.

Version: last updated: 11/25/95

Author: Scott Hudson

See Also: production

Field Summary
protected String_label
Optional label for referring to the part within an action (null for no label).
Constructor Summary
production_part(String lab)
Simple constructor.
Method Summary
booleanequals(production_part other)
Equality comparison.
booleanequals(Object other)
Generic equality comparison.
inthashCode()
Produce a hash code.
abstract booleanis_action()
Indicate if this is an action (rather than a symbol).
Stringlabel()
Optional label for referring to the part within an action (null for no label).
StringtoString()
Convert to a string.

Field Detail

_label

protected String _label
Optional label for referring to the part within an action (null for no label).

Constructor Detail

production_part

public production_part(String lab)
Simple constructor.

Method Detail

equals

public boolean equals(production_part other)
Equality comparison.

equals

public boolean equals(Object other)
Generic equality comparison.

hashCode

public int hashCode()
Produce a hash code.

is_action

public abstract boolean is_action()
Indicate if this is an action (rather than a symbol). Here in the base class, we don't this know yet, so its an abstract method.

label

public String label()
Optional label for referring to the part within an action (null for no label).

toString

public String toString()
Convert to a string.