java_cup

Class symbol_part

public class symbol_part extends production_part

This class represents a part of a production which is a symbol (terminal or non terminal). This simply maintains a reference to the symbol in question.

Version: last updated: 11/25/95

Author: Scott Hudson

See Also: production

Field Summary
protected symbol_the_symbol
The symbol that this part is made up of.
Constructor Summary
symbol_part(symbol sym, String lab)
Full constructor.
symbol_part(symbol sym)
Constructor with no label.
Method Summary
booleanequals(symbol_part other)
Equality comparison.
booleanequals(Object other)
Generic equality comparison.
inthashCode()
Produce a hash code.
booleanis_action()
Respond that we are not an action part.
symbolthe_symbol()
The symbol that this part is made up of.
StringtoString()
Convert to a string.

Field Detail

_the_symbol

protected symbol _the_symbol
The symbol that this part is made up of.

Constructor Detail

symbol_part

public symbol_part(symbol sym, String lab)
Full constructor.

Parameters: sym the symbol that this part is made up of. lab an optional label string for the part.

symbol_part

public symbol_part(symbol sym)
Constructor with no label.

Parameters: sym the symbol that this part is made up of.

Method Detail

equals

public boolean equals(symbol_part other)
Equality comparison.

equals

public boolean equals(Object other)
Generic equality comparison.

hashCode

public int hashCode()
Produce a hash code.

is_action

public boolean is_action()
Respond that we are not an action part.

the_symbol

public symbol the_symbol()
The symbol that this part is made up of.

toString

public String toString()
Convert to a string.