ptolemy.data.expr
Class ASTPtShiftNode
java.lang.Object
extended byptolemy.data.expr.ASTPtRootNode
extended byptolemy.data.expr.ASTPtShiftNode
- All Implemented Interfaces:
- java.lang.Cloneable, Node
- public class ASTPtShiftNode
- extends ASTPtRootNode
The parse tree created from the expression string consists of a
hierarchy of node objects. This class represents shift
operators(>>, <<, <<<) nodes in the parse tree.
Each node of this type has exactly two children. The resolved type
is the type of the first child.
- Since:
- Ptolemy II 0.2
- Version:
- $Id: ASTPtShiftNode.java,v 1.15 2005年07月08日 19:57:27 cxh Exp $
- Author:
- Steve Neuendorffer
- See Also:
ASTPtRootNode,
PtParser,
Token
- Accepted Rating:
Red (cxh)
- Proposed Rating:
Yellow (nsmyth)
|
Method Summary |
Token |
getOperator()
Return the lexical token representing the operation of this node. |
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.
|
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, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_lexicalToken
protected Token _lexicalToken
ASTPtShiftNode
public ASTPtShiftNode(int id)
ASTPtShiftNode
public ASTPtShiftNode(PtParser p,
int id)
getOperator
public Token getOperator()
- Return the lexical token representing the operation of this node.
-
isCongruent
public 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.
Derived classes should extend this method to add additional
necessary congruency checks.
- Overrides:
isCongruent in class ASTPtRootNode
- Parameters:
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.
visit
public void visit(ParseTreeVisitor visitor)
throws IllegalActionException
- Traverse this node with the given visitor.
- Overrides:
visit in class ASTPtRootNode
- Throws:
IllegalActionException