public interface Node extends java.util.ListIterator<Node>
| Modifier and Type | Method and Description |
|---|---|
void |
dump(java.lang.String prefix)
Dump the children hierarchy.
|
java.lang.Object |
eval(CallStack callstack,
Interpreter interpreter)
This is the general signature for evaluation of a node.
|
int |
getId()
Return the node type ID.
|
int |
getLineNumber()
Get the line number of the starting token
|
java.lang.String |
getSourceFile()
Get the name of the source file (or more generally source) of the text
from which this node was parsed.
|
java.lang.String |
getText()
Get the text of the tokens comprising this node.
|
void |
jjtAddChild(Node n,
int i)
Add argument to the list of children.
|
void |
jjtClose()
Called after all the child nodes have been added.
|
Node |
jjtGetChild(int i)
Returns the child node at the given index.
|
Node[] |
jjtGetChildren()
Return the list of child nodes..
|
int |
jjtGetNumChildren()
Return the number of children the node has.
|
Node |
jjtGetParent()
Return node parent.
|
void |
jjtOpen()
Called after the node has been made the current node.
|
void |
jjtSetParent(Node n)
Inform the node of its parent.
|
void |
setSourceFile(java.lang.String sourceFile)
Set the name of the source file (or more generally source) of the text
from which this node was parsed.
|
java.lang.String |
toString(java.lang.String prefix)
Overloaded toString with prefix used by dump.
|
static final Node JAVACODE
java.lang.Object eval(CallStack callstack, Interpreter interpreter) throws EvalError
callstack - evaluation call stackinterpreter - evaluation interpreterEvalError - if an evaluation error occurredvoid setSourceFile(java.lang.String sourceFile)
sourceFile - sourcejava.lang.String getSourceFile()
int getLineNumber()
java.lang.String getText()
void dump(java.lang.String prefix)
prefix - a prefix stringjava.lang.String toString(java.lang.String prefix)
prefix - a prefix stringNode[] jjtGetChildren()
void jjtOpen()
void jjtClose()
void jjtSetParent(Node n)
n - Node jjtGetParent()
void jjtAddChild(Node n, int i)
n - the child node to addi - index of child nodeNode jjtGetChild(int i)
i - child indexint jjtGetNumChildren()
int getId()