Top Description Fields Constructors Methods
java_cup

public Class action_part

extends production_part
Class Inheritance

This class represents a part of a production which contains an action. These are eventually eliminated from productions and converted to trailing actions by factoring out with a production that derives the empty string (and ends with this action).
Author
Scott Hudson
Version
last update: 11/25/95
See Also
java_cup.production

Field Summary

Modifier and TypeField and Description
protected String
_code_string

String containing code for the action in question.

Inherited from java_cup.production_part:
_label

Constructor Summary

AccessConstructor and Description
public
action_part(String
string containing the actual user code.
code_str
)

Simple constructor.

Method Summary

Modifier and TypeMethod and Description
public String
code_string()

String containing code for the action in question.

public boolean
equals(action_part other)

Equality comparison for properly typed object.

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.

Override to report this object as an action.
public void
set_code_string(String new_str)

Set the code string.

public String
toString()

Overrides java_cup.production_part.toString.

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

Field Detail

_code_stringback to summary
protected String _code_string

String containing code for the action in question.

Constructor Detail

action_partback to summary
public action_part(String code_str)

Simple constructor.

Parameters
code_str:String

string containing the actual user code.

Method Detail

code_stringback to summary
public String code_string()

String containing code for the action in question.

equalsback to summary
public boolean equals(action_part other)

Equality comparison for properly typed object.

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.

Override to report this object as an action.

set_code_stringback to summary
public void set_code_string(String new_str)

Set the code string.

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.