Class ParseTreeConstraintAnnotationEvaluator

  • All Implemented Interfaces:
    ParseTreeVisitor

    public class ParseTreeConstraintAnnotationEvaluator
    extends ParseTreeAnnotationEvaluator
    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:
    Man-Kit Leung
    See Also:
    ASTPtRootNode
    Pt.AcceptedRating:
    Red (mankit)
    Pt.ProposedRating:
    Red (mankit)
    • Constructor Detail

      • ParseTreeConstraintAnnotationEvaluator

        public ParseTreeConstraintAnnotationEvaluator()
    • Method Detail

      • visitLeafNode

        public void visitLeafNode​(ASTPtLeafNode node)
                           throws IllegalActionException
        visitLeafNode method is called when parsing an Annotation for a manual constraint. 12/16/09 Charles Shelton This visitLeafNode method assumes the node will refer to either a component in the model or a Concept in the ontology. The _evaluatedObject will then be set to that component or Concept. If it is not, then an exception is thrown. This method calls the superclass method for model Components, and then catches the superclass' exception to check for a Concept.
        Specified by:
        visitLeafNode in interface ParseTreeVisitor
        Overrides:
        visitLeafNode in class ParseTreeAnnotationEvaluator
        Parameters:
        node - The leaf node to be visited
        Throws:
        IllegalActionException - If the node label cannot be resolved to a component in the model