Package java_cup
Class symbol_part
java.lang.Object
java_cup.production_part
java_cup.symbol_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:
-
Field Summary
FieldsFields inherited from class java_cup.production_part
_label
-
Constructor Summary
ConstructorsConstructorDescriptionsymbol_part
(symbol sym) Constructor with no label.symbol_part
(symbol sym, String lab) Full constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
equals
(symbol_part other) Equality comparison.boolean
Generic equality comparison.int
hashCode()
Produce a hash code.boolean
Respond that we are not an action part.The symbol that this part is made up of.toString()
Convert to a string.Methods inherited from class java_cup.production_part
equals, label
-
Field Details
-
_the_symbol
The symbol that this part is made up of.
-
-
Constructor Details
-
symbol_part
Full constructor.- Parameters:
sym
- the symbol that this part is made up of.lab
- an optional label string for the part.- Throws:
internal_error
-
symbol_part
Constructor with no label.- Parameters:
sym
- the symbol that this part is made up of.- Throws:
internal_error
-
-
Method Details
-
the_symbol
The symbol that this part is made up of. -
is_action
public boolean is_action()Respond that we are not an action part.- Specified by:
is_action
in classproduction_part
-
equals
Equality comparison. -
equals
Generic equality comparison.- Overrides:
equals
in classproduction_part
-
hashCode
public int hashCode()Produce a hash code.- Overrides:
hashCode
in classproduction_part
-
toString
Convert to a string.- Overrides:
toString
in classproduction_part
-