java_cup
Class 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:
- Scott Hudson
production
_the_symbol
protected symbol _the_symbol
The symbol that this part is made up of.
symbol_part
public symbol_part(symbol sym)
throws internal_error
Constructor with no label.
sym
- the symbol that this part is made up of.
symbol_part
public symbol_part(symbol sym,
String lab)
throws internal_error
Full constructor.
sym
- the symbol that this part is made up of.lab
- an optional label string for the part.
equals
public boolean equals(Object other)
Generic equality comparison.
- equals in interface production_part
equals
public boolean equals(symbol_part other)
Equality comparison.
hashCode
public int hashCode()
Produce a hash code.
- hashCode in interface production_part
is_action
public boolean is_action()
Respond that we are not an action part.
- is_action in interface production_part
the_symbol
public symbol the_symbol()
The symbol that this part is made up of.
toString
public String toString()
Convert to a string.
- toString in interface production_part