Class CalInterpreter

    • Field Detail

      • calCode

        public StringAttribute calCode
        The CAL source to be interpreted.
      • defaultActorText

        protected static final java.lang.String defaultActorText
        Default CAL code.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CalInterpreter

        public CalInterpreter​(Workspace workspace)
        Construct an actor in the given workspace. Increment the version number of the workspace.
        Parameters:
        workspace - The workspace that will list the actor.
    • Method Detail

      • attributeChanged

        public void attributeChanged​(Attribute attribute)
                              throws IllegalActionException
        The only attribute whose modifications are handled is the calCode attribute, which contains the source code of the CAL actor.

        Whenever the source is changed, the text is parsed, transformed, and translated into an internal data structure used for interpretation.

        Overrides:
        attributeChanged in class NamedObj
        Parameters:
        attribute - The attribute that changed.
        Throws:
        IllegalActionException - If an error occurs parsing or transforming the CAL source code.