Package ptolemy.data.ontologies
Class ParseTreeASTNodeAdapterCollector
- java.lang.Object
-
- ptolemy.data.expr.AbstractParseTreeVisitor
-
- ptolemy.data.ontologies.ParseTreeASTNodeAdapterCollector
-
- All Implemented Interfaces:
ParseTreeVisitor
public class ParseTreeASTNodeAdapterCollector extends AbstractParseTreeVisitor
FIXME: What is this??? Copy and pasted comment below. This class visits parse trees and infers a property for each node in the parse tree. This property is stored in the parse tree.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Steve Neuendorffer
- See Also:
ASTPtRootNode
- Pt.AcceptedRating:
- Yellow (neuendor)
- Pt.ProposedRating:
- Green (neuendor)
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<OntologyAdapter>
_adapters
The list of ontology adapters for each node in the AST.protected OntologySolver
_solver
The given ontology solver for which the AST will be evaluated.
-
Constructor Summary
Constructors Constructor Description ParseTreeASTNodeAdapterCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_visitAllChildren(ASTPtRootNode node)
Loop through all of the children of this node, visiting each one of them, which will cause their token value to be determined.protected void
_visitChild(ASTPtRootNode node, int i)
Visit the child with the given index of the given node.java.util.List<OntologyAdapter>
collectAdapters(ASTPtRootNode node, OntologySolver solver)
Infer the property of the parse tree with the specified root node using the specified scope to resolve the values of variables.-
Methods inherited from class ptolemy.data.expr.AbstractParseTreeVisitor
_unsupportedVisitException, visitArrayConstructNode, visitAssignmentNode, visitBitwiseNode, visitFunctionalIfNode, visitFunctionApplicationNode, visitFunctionDefinitionNode, visitLeafNode, visitLogicalNode, visitMatrixConstructNode, visitMethodCallNode, visitPowerNode, visitProductNode, visitRecordConstructNode, visitRelationalNode, visitShiftNode, visitSumNode, visitUnaryNode, visitUnionConstructNode
-
-
-
-
Field Detail
-
_adapters
protected java.util.List<OntologyAdapter> _adapters
The list of ontology adapters for each node in the AST.
-
_solver
protected OntologySolver _solver
The given ontology solver for which the AST will be evaluated.
-
-
Method Detail
-
collectAdapters
public java.util.List<OntologyAdapter> collectAdapters(ASTPtRootNode node, OntologySolver solver) throws IllegalActionException
Infer the property of the parse tree with the specified root node using the specified scope to resolve the values of variables.- Parameters:
node
- The root of the parse tree.solver
- The given solver.- Returns:
- The list of property adapters.
- Throws:
IllegalActionException
- If an error occurs during evaluation.
-
_visitAllChildren
protected void _visitAllChildren(ASTPtRootNode node) throws IllegalActionException
Loop through all of the children of this node, visiting each one of them, which will cause their token value to be determined.- Overrides:
_visitAllChildren
in classAbstractParseTreeVisitor
- Parameters:
node
- The root node whose children will be visited- Throws:
IllegalActionException
- If an exception is thrown while visiting child nodes
-
_visitChild
protected void _visitChild(ASTPtRootNode node, int i) throws IllegalActionException
Visit the child with the given index of the given node. This is usually called while visiting the given node.- Overrides:
_visitChild
in classAbstractParseTreeVisitor
- Parameters:
node
- The root node whose child will be visitedi
- The index (starting from 0) of the child node to be visited- Throws:
IllegalActionException
- If an exception is thrown while visiting the child node
-
-