java_cup

Class action_part

public class action_part extends production_part

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).

Version: last update: 11/25/95

Author: Scott Hudson

See Also: production

Field Summary
protected String_code_string
String containing code for the action in question.
Constructor Summary
action_part(String code_str)
Simple constructor.
Method Summary
Stringcode_string()
String containing code for the action in question.
booleanequals(action_part other)
Equality comparison for properly typed object.
booleanequals(Object other)
Generic equality comparison.
inthashCode()
Produce a hash code.
booleanis_action()
Override to report this object as an action.
voidset_code_string(String new_str)
Set the code string.
StringtoString()
Convert to a string.

Field Detail

_code_string

protected String _code_string
String containing code for the action in question.

Constructor Detail

action_part

public action_part(String code_str)
Simple constructor.

Parameters: code_str string containing the actual user code.

Method Detail

code_string

public String code_string()
String containing code for the action in question.

equals

public boolean equals(action_part other)
Equality comparison for properly typed object.

equals

public boolean equals(Object other)
Generic equality comparison.

hashCode

public int hashCode()
Produce a hash code.

is_action

public boolean is_action()
Override to report this object as an action.

set_code_string

public void set_code_string(String new_str)
Set the code string.

toString

public String toString()
Convert to a string.