| xtc.parser.Element xtc.parser.Action
Action | public class Action extends Element (Code) | | A semantic action.
author: Robert Grimm version: $Revision: 1.22 $ |
Field Summary | |
final public List<String> | code The list of source lines for the semantic action. | final public List<Integer> | indent The list of indentation levels, one per line of code. |
code | final public List<String> code(Code) | | The list of source lines for the semantic action. Note that each
source line is a string without the terminating end-of-line
character(s).
|
indent | final public List<Integer> indent(Code) | | The list of indentation levels, one per line of code. Note that
this list must be at least as long as the list of source lines.
|
Action | public Action(String s, List<Integer> indent)(Code) | | Create a new action with the specified code. The specified
string is broken up into individual lines, removing all
end-of-line characters along the way.
Parameters: s - The code as a string. Parameters: indent - The list of indentation levels, one per linein the specified string. throws: IllegalArgumentException - Signals that indent is too short. |
Action | public Action(List<String> code, List<Integer> indent)(Code) | | Create a new action with the specified code.
Parameters: code - The code as a list source lines. Parameters: indent - The corresponding indentation levels. throws: IllegalArgumentException - Signals that the number of code lines is inconsistent with thenumber of indentation levels. |
add | public void add(Action a)(Code) | | Add the specified action to this action.
Parameters: a - The action to add. |
hashCode | public int hashCode()(Code) | | |
setsValue | public boolean setsValue()(Code) | | Determine whether this action sets the
CodeGenerator.VALUEsemantic value . This method implements a conservative
approximation by searching for occurrences of the corresponding
variable name.
true if this action sets the semantic value. |
Methods inherited from xtc.parser.Element | abstract public Tag tag()(Code)(Java Doc)
|
|
|