Top Description Fields Constructors Methods
java_cup

public Class symbol_part

extends production_part
Class Inheritance

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.
Author
Scott Hudson
Version
last updated: 11/25/95
See Also
java_cup.production

Field Summary

Modifier and TypeField and Description
protected symbol
_the_symbol

The symbol that this part is made up of.

Inherited from java_cup.production_part:
_label

Constructor Summary

AccessConstructor and Description
public
symbol_part(symbol
the symbol that this part is made up of.
sym
,
String
an optional label string for the part.
lab
)

Full constructor.

public
symbol_part(symbol
the symbol that this part is made up of.
sym
)

Constructor with no label.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(symbol_part other)

Equality comparison.

public boolean
equals(Object
the reference object with which to compare.
other
)

Overrides java_cup.production_part.equals.

Generic equality comparison.
public int
hashCode()

Overrides java_cup.production_part.hashCode.

Produce a hash code.
public boolean
is_action()

Implements abstract java_cup.production_part.is_action.

Respond that we are not an action part.
public symbol
the_symbol()

The symbol that this part is made up of.

public String
toString()

Overrides java_cup.production_part.toString.

Convert to a string.
Inherited from java_cup.production_part:
equalslabel

Field Detail

_the_symbolback to summary
protected symbol _the_symbol

The symbol that this part is made up of.

Constructor Detail

symbol_partback to summary
public symbol_part(symbol sym, String lab) throws internal_error

Full constructor.

Parameters
sym:symbol

the symbol that this part is made up of.

lab:String

an optional label string for the part.

symbol_partback to summary
public symbol_part(symbol sym) throws internal_error

Constructor with no label.

Parameters
sym:symbol

the symbol that this part is made up of.

Method Detail

equalsback to summary
public boolean equals(symbol_part other)

Equality comparison.

equalsback to summary
public boolean equals(Object other)

Overrides java_cup.production_part.equals.

Generic equality comparison.

Parameters
other:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

hashCodeback to summary
public int hashCode()

Overrides java_cup.production_part.hashCode.

Produce a hash code.

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object.

is_actionback to summary
public boolean is_action()

Implements abstract java_cup.production_part.is_action.

Respond that we are not an action part.

the_symbolback to summary
public symbol the_symbol()

The symbol that this part is made up of.

toStringback to summary
public String toString()

Overrides java_cup.production_part.toString.

Convert to a string.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object.