|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxtc.tree.Node
xtc.parser.Element
xtc.parser.Action
public class Action
A semantic action.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class xtc.parser.Element |
|---|
Element.Tag |
| Field Summary | |
|---|---|
java.util.List<java.lang.String> |
code
The list of source lines for the semantic action. |
java.util.List<java.lang.Integer> |
indent
The list of indentation levels, one per line of code. |
| Constructor Summary | |
|---|---|
Action(java.util.List<java.lang.String> code,
java.util.List<java.lang.Integer> indent)
Create a new action with the specified code. |
|
Action(java.lang.String s,
java.util.List<java.lang.Integer> indent)
Create a new action with the specified code. |
|
| Method Summary | |
|---|---|
void |
add(Action a)
Add the specified action to this action. |
boolean |
equals(java.lang.Object o)
|
int |
hashCode()
|
boolean |
setsValue()
Determine whether this action sets the semantic value. |
Element.Tag |
tag()
Get this element's tag. |
| Methods inherited from class xtc.tree.Node |
|---|
add, add, addAll, addAll, addAll, addAll, addAllTo, addNode, contains, get, getBoolean, getBooleanProperty, getGeneric, getList, getLocation, getName, getNode, getProperty, getString, getStringProperty, getTokenText, hasLocation, hasName, hasProperty, hasTraversal, hasVariable, indexOf, isAnnotation, isEmpty, isGeneric, isList, isToken, iterator, lastIndexOf, properties, remove, removeProperty, set, setLocation, setLocation, setProperty, size, strip, toAnnotation, toList, toString, toToken, write |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final java.util.List<java.lang.String> code
public final java.util.List<java.lang.Integer> indent
| Constructor Detail |
|---|
public Action(java.lang.String s,
java.util.List<java.lang.Integer> indent)
s - The code as a string.indent - The list of indentation levels, one per line
in the specified string.
java.lang.IllegalArgumentException - Signals that indent is too short.
public Action(java.util.List<java.lang.String> code,
java.util.List<java.lang.Integer> indent)
code - The code as a list source lines.indent - The corresponding indentation levels.
java.lang.IllegalArgumentException - Signals that the number of code lines is inconsistent with the
number of indentation levels.| Method Detail |
|---|
public Element.Tag tag()
Element
tag in class Elementpublic void add(Action a)
a - The action to add.public boolean setsValue()
semantic value. This method implements a conservative
approximation by searching for occurrences of the corresponding
variable name.
true if this action sets the semantic value.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||