Class 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 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.
    • Constructor Detail

      • ParseTreeASTNodeAdapterCollector

        public ParseTreeASTNodeAdapterCollector()
    • 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.
      • _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 class AbstractParseTreeVisitor
        Parameters:
        node - The root node whose child will be visited
        i - The index (starting from 0) of the child node to be visited
        Throws:
        IllegalActionException - If an exception is thrown while visiting the child node