Examples of ASTPtRootNode


Examples of ptolemy.data.expr.ASTPtRootNode

                            return true;
                        } else if (cellValue.equals("pointer")) {
                            return true;
                        }

                        ASTPtRootNode tree = _typeParser
                                .generateParseTree(cellValue);
                        /* Token result = */_parseTreeEvaluator
                                .evaluateParseTree(tree, null);
                    } catch (IllegalActionException e) {
                        setMessage(e.getMessage());
View Full Code Here

Examples of ptolemy.data.expr.ASTPtRootNode

            while (destinations.hasNext()) {
                NamedObj nextDestination = (NamedObj) destinations.next();

                // Need to get the next channel even if it's not used.
                Integer channel = (Integer) channels.next();
                ASTPtRootNode parseTree = (ASTPtRootNode) parseTrees.next();
                Token token;

                // In MultirateFSMDirector, the initial transition from
                // the initial state is taken during preinitialize() if
                // the initial state does not have a refinement, therefore
View Full Code Here

Examples of ptolemy.data.expr.ASTPtRootNode

            throws IllegalActionException {
        _outputActionReferredInputPorts.clear();

        String string = transition.outputActions.getExpression();
        PtParser parser = new PtParser();
        ASTPtRootNode parseTree;
        ParseTreeFreeVariableCollector variableCollector = new ParseTreeFreeVariableCollector();
        FSMActor controller = getController();
        ParserScope scope = controller.getPortScope();

        if (!string.equals("")) {
View Full Code Here

Examples of ptolemy.data.expr.ASTPtRootNode

            throws IllegalActionException {
        _setActionReferredInputPorts.clear();

        String string = transition.setActions.getExpression();
        PtParser parser = new PtParser();
        ASTPtRootNode parseTree;
        ParseTreeFreeVariableCollector variableCollector = new ParseTreeFreeVariableCollector();
        FSMActor controller = getController();
        ParserScope scope = controller.getPortScope();

        if (!string.equals("")) {
View Full Code Here

Examples of ptolemy.data.expr.ASTPtRootNode

                throw new IllegalActionException(this, "guard expression on "
                        + transition.getName() + "is null!");
            }

            PtParser parser = new PtParser();
            ASTPtRootNode parseTree = parser.generateParseTree(string);
            ParseTreeFreeVariableCollector variableCollector = new ParseTreeFreeVariableCollector();
            FSMActor controller = getController();
            ParserScope scope = controller.getPortScope();
            Set set = variableCollector.collectFreeVariables(parseTree, scope);
            getReferredInputPorts(set, transitionsReferredInputPorts);
View Full Code Here

Examples of ptolemy.data.expr.ASTPtRootNode

                    if ((term != this) && (term.getValue() == BaseType.UNKNOWN)) {
                        return BaseType.UNKNOWN;
                    }
                }

                ASTPtRootNode parseTree = (ASTPtRootNode) _parseTrees
                        .get(_destinationNames.indexOf(_name));

                if (_scope == null) {
                    FSMActor fsmActor = (FSMActor) getContainer()
                            .getContainer();
View Full Code Here

Examples of ptolemy.data.expr.ASTPtRootNode

        public InequalityTerm[] getVariables() {
            // Return an array that contains type terms for all of the
            // inputs and all of the parameters that are free variables for
            // the expression.
            try {
                ASTPtRootNode parseTree = (ASTPtRootNode) _parseTrees
                        .get(_destinationNames.indexOf(_name));

                if (_scope == null) {
                    FSMActor fsmActor = (FSMActor) getContainer()
                            .getContainer();
View Full Code Here

Examples of ptolemy.data.expr.ASTPtRootNode

     @exception IllegalActionException If the string does not
     *  contain a parsable record.
     */
    public RecordToken(String init) throws IllegalActionException {
        PtParser parser = new PtParser();
        ASTPtRootNode tree = parser.generateParseTree(init);

        ParseTreeEvaluator evaluator = new ParseTreeEvaluator();
        Token token = evaluator.evaluateParseTree(tree);

        if (token instanceof RecordToken) {
View Full Code Here

Examples of ptolemy.data.expr.ASTPtRootNode

     @exception IllegalActionException If the string does not
     *  contain a parsable record.
     */
    public UnionToken(String init) throws IllegalActionException {
        PtParser parser = new PtParser();
        ASTPtRootNode tree = parser.generateParseTree(init);

        ParseTreeEvaluator evaluator = new ParseTreeEvaluator();
        Token token = evaluator.evaluateParseTree(tree);

        if (token instanceof UnionToken) {
View Full Code Here

Examples of ptolemy.data.expr.ASTPtRootNode

        if (command.trim().equals("")) {
            return "";
        }

        PtParser parser = new PtParser();
        ASTPtRootNode node = parser.generateSimpleAssignmentParseTree(command);
        String targetName = null;

        // Figure out if we got an assignment... if so, then get the
        // identifier name and only evaluated the expression part.
        if (node instanceof ASTPtAssignmentNode) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.