|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ptolemy.data.expr.ASTPtRootNode ptolemy.data.expr.ASTPtLeafNode
public class ASTPtLeafNode
The parse tree created from the expression string consists of a hierarchy of node objects. This class represents the leaf nodes of the tree.
ASTPtRootNode
,
PtParser
,
Token
Red (cxh) |
Yellow (nsmyth) |
Field Summary | |
---|---|
protected java.lang.String |
_name
The identifier that this leaf node refers to. |
Fields inherited from class ptolemy.data.expr.ASTPtRootNode |
---|
_children, _id, _isConstant, _parent, _ptToken, _ptType |
Constructor Summary | |
---|---|
ASTPtLeafNode(int id)
|
|
ASTPtLeafNode(PtParser p,
int id)
|
Method Summary | |
---|---|
java.lang.String |
getName()
Return the name that this node refers to. |
boolean |
isCongruent(ASTPtRootNode node,
java.util.Map renaming)
Return true if this node is (hierarchically) congruent to the given node, under the given renaming of bound identifiers. |
boolean |
isIdentifier()
Return true if the leaf is an identifier that must be evaluated in scope. |
java.lang.String |
toString()
Return a string representation |
void |
visit(ParseTreeVisitor visitor)
Traverse this node with the given visitor. |
Methods inherited from class ptolemy.data.expr.ASTPtRootNode |
---|
clone, displayParseTree, evaluateParseTree, getToken, getType, isConstant, isEvaluated, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, setConstant, setToken, setType, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String _name
Constructor Detail |
---|
public ASTPtLeafNode(int id)
public ASTPtLeafNode(PtParser p, int id)
Method Detail |
---|
public java.lang.String getName()
public boolean isCongruent(ASTPtRootNode node, java.util.Map renaming)
isCongruent
in class ASTPtRootNode
node
- The node to compare to.renaming
- A map from String to String that gives a
renaming from identifiers in this node to identifiers in the
given node.public boolean isIdentifier()
public java.lang.String toString()
toString
in class ASTPtRootNode
public void visit(ParseTreeVisitor visitor) throws IllegalActionException
visit
in class ASTPtRootNode
IllegalActionException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |