Package ptolemy.data.expr
Class ASTPtSumNode
- java.lang.Object
- 
- ptolemy.data.expr.ASTPtRootNode
- 
- ptolemy.data.expr.ASTPtSumNode
 
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable,- Node
 
 public class ASTPtSumNode extends ASTPtRootNode The parse tree created from the expression string consists of a hierarchy of node objects. This class represents sum(+, -) nodes in the parse tree.- Since:
- Ptolemy II 0.2
- Version:
- $Id$
- Author:
- Neil Smyth, Steve Neuendorffer
- See Also:
- ASTPtRootNode,- PtParser,- Token
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Yellow (nsmyth)
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.ArrayList<Token>_lexicalTokens- 
Fields inherited from class ptolemy.data.expr.ASTPtRootNode_children, _id, _isConstant, _parent, _ptToken, _ptType
 
- 
 - 
Constructor SummaryConstructors Constructor Description ASTPtSumNode(int id)ASTPtSumNode(PtParser p, int id)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Clone the parse tree node by invoking the clone() method of the base class.java.util.List<Token>getLexicalTokenList()Return the list of lexical tokens that were used to make this node.booleanisCongruent(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.voidjjtClose()Close this node.voidvisit(ParseTreeVisitor visitor)Traverse this node with the given visitor.- 
Methods inherited from class ptolemy.data.expr.ASTPtRootNodedisplayParseTree, evaluateParseTree, getToken, getType, isConstant, isEvaluated, jjtAddChild, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, setConstant, setToken, setType, toString, toString
 
- 
 
- 
- 
- 
Field Detail- 
_lexicalTokensprotected java.util.ArrayList<Token> _lexicalTokens 
 
- 
 - 
Constructor Detail- 
ASTPtSumNodepublic ASTPtSumNode(int id) 
 - 
ASTPtSumNodepublic ASTPtSumNode(PtParser p, int id) 
 
- 
 - 
Method Detail- 
clonepublic java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionClone the parse tree node by invoking the clone() method of the base class. The new node copies the list of operators (+, -) represented by this node.- Overrides:
- clonein class- ASTPtRootNode
- Returns:
- A new parse tree node.
- Throws:
- java.lang.CloneNotSupportedException- If the superclass clone() method throws it.
 
 - 
getLexicalTokenListpublic java.util.List<Token> getLexicalTokenList() Return the list of lexical tokens that were used to make this node.- Returns:
- The list of lexical tokens that were used to make this node.
 
 - 
isCongruentpublic 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:
- isCongruentin 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.
- Returns:
- True if the node is congruent.
 
 - 
jjtClosepublic void jjtClose() Close this node.- Specified by:
- jjtClosein interface- Node
- Overrides:
- jjtClosein class- ASTPtRootNode
 
 - 
visitpublic void visit(ParseTreeVisitor visitor) throws IllegalActionException Traverse this node with the given visitor.- Overrides:
- visitin class- ASTPtRootNode
- Parameters:
- visitor- The visitor.
- Throws:
- IllegalActionException- Always thrown in this base class the visit() method is not implemented here.
 
 
- 
 
-