|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.data.expr.ASTPtRootNode
ptolemy.data.expr.ASTPtUnaryNode
public class ASTPtUnaryNode
The parse tree created from the expression string consists of a hierarchy of node objects. This class represents unary operator(!, -, ~) nodes in the parse tree.
ASTPtRootNode
,
PtParser
,
Token
Red (cxh) |
Yellow (nsmyth) |
Field Summary | |
---|---|
protected boolean |
_isBitwiseNot
|
protected boolean |
_isMinus
|
protected boolean |
_isNot
|
protected Token |
_lexicalToken
|
Fields inherited from class ptolemy.data.expr.ASTPtRootNode |
---|
_children, _id, _isConstant, _parent, _ptToken, _ptType |
Constructor Summary | |
---|---|
ASTPtUnaryNode(int id)
|
|
ASTPtUnaryNode(PtParser p,
int id)
|
Method Summary | |
---|---|
Token |
getOperator()
Return the token that represents the operation of this node. |
boolean |
isBitwiseNot()
Return true if this node represents the bitwise negation of its child. |
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 |
isMinus()
Return true if this node represents the additive inverse of its child. |
boolean |
isNot()
Return true if this node represents the boolean negation of its child. |
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 |
Field Detail |
---|
protected boolean _isMinus
protected boolean _isNot
protected boolean _isBitwiseNot
protected Token _lexicalToken
Constructor Detail |
---|
public ASTPtUnaryNode(int id)
public ASTPtUnaryNode(PtParser p, int id)
Method Detail |
---|
public Token getOperator()
public boolean isBitwiseNot()
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 isMinus()
public boolean isNot()
public void visit(ParseTreeVisitor visitor) throws IllegalActionException
visit
in class ASTPtRootNode
IllegalActionException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |