Package java_cup
Class action_part
- java.lang.Object
-
- java_cup.production_part
-
- java_cup.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).- See Also:
production
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String_code_stringString containing code for the action in question.-
Fields inherited from class java_cup.production_part
_label
-
-
Constructor Summary
Constructors Constructor Description action_part(java.lang.String code_str)Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringcode_string()String containing code for the action in question.booleanequals(action_part other)Equality comparison for properly typed object.booleanequals(java.lang.Object other)Generic equality comparison.inthashCode()Produce a hash code.booleanis_action()Override to report this object as an action.voidset_code_string(java.lang.String new_str)Set the code string.java.lang.StringtoString()Convert to a string.-
Methods inherited from class java_cup.production_part
equals, label
-
-
-
-
Method Detail
-
code_string
public java.lang.String code_string()
String containing code for the action in question.
-
set_code_string
public void set_code_string(java.lang.String new_str)
Set the code string.
-
is_action
public boolean is_action()
Override to report this object as an action.- Specified by:
is_actionin classproduction_part
-
equals
public boolean equals(action_part other)
Equality comparison for properly typed object.
-
equals
public boolean equals(java.lang.Object other)
Generic equality comparison.- Overrides:
equalsin classproduction_part
-
hashCode
public int hashCode()
Produce a hash code.- Overrides:
hashCodein classproduction_part
-
toString
public java.lang.String toString()
Convert to a string.- Overrides:
toStringin classproduction_part
-
-