Examples of evaluateParseTree()


Examples of ptolemy.codegen.kernel.ParseTreeCodeGenerator.evaluateParseTree()

            String guard = transition.getGuardExpression();
            PtParser parser = new PtParser();
            ASTPtRootNode guardParseTree = parser.generateParseTree(guard);
            ParseTreeCodeGenerator parseTreeCodeGenerator = controllerHelper
                    .getParseTreeCodeGenerator();
            parseTreeCodeGenerator.evaluateParseTree(guardParseTree,
                    controllerHelper._scope);
            codeBuffer.append(parseTreeCodeGenerator.generateFireCode());
            codeBuffer.append(") {" + _eol);

            // generate code for commit action
View Full Code Here

Examples of ptolemy.codegen.kernel.ParseTreeCodeGenerator.evaluateParseTree()

                                + " produced in any action for "
                                + "MultirateFSMDirector.");
                    }
                    parseTreeCodeGenerator = controllerHelper
                            .getParseTreeCodeGenerator();
                    parseTreeCodeGenerator.evaluateParseTree(parseTree,
                            controllerHelper._scope);
                    codeBuffer
                            .append(parseTreeCodeGenerator.generateFireCode());
                    codeBuffer.append(";" + _eol);
                }
View Full Code Here

Examples of ptolemy.codegen.kernel.ParseTreeCodeGenerator.evaluateParseTree()

                    String guard = transition.getGuardExpression();
                    PtParser parser = new PtParser();
                    ASTPtRootNode guardParseTree = parser
                            .generateParseTree(guard);
                    ParseTreeCodeGenerator parseTreeCodeGenerator = getParseTreeCodeGenerator();
                    parseTreeCodeGenerator.evaluateParseTree(guardParseTree,
                            _scope);
                    codeBuffer
                            .append(parseTreeCodeGenerator.generateFireCode());
                }
                codeBuffer.append(") {" + _eol);
View Full Code Here

Examples of ptolemy.codegen.kernel.ParseTreeCodeGenerator.evaluateParseTree()

                                }
                            }
                        }

                        ParseTreeCodeGenerator parseTreeCodeGenerator = getParseTreeCodeGenerator();
                        parseTreeCodeGenerator.evaluateParseTree(parseTree,
                                _scope);
                        codeBuffer.append(parseTreeCodeGenerator
                                .generateFireCode());
                        codeBuffer.append(";" + _eol);
                    }
View Full Code Here

Examples of ptolemy.codegen.kernel.ParseTreeCodeGenerator.evaluateParseTree()

                                            .generateVariableName((Variable) destination)
                                            + " = ");
                        }

                        ParseTreeCodeGenerator parseTreeCodeGenerator = getParseTreeCodeGenerator();
                        parseTreeCodeGenerator.evaluateParseTree(parseTree,
                                _scope);
                        codeBuffer.append(parseTreeCodeGenerator
                                .generateFireCode());
                        codeBuffer.append(";" + _eol);
                    }
View Full Code Here

Examples of ptolemy.data.expr.ParseTreeEvaluator.evaluateParseTree()

            } catch (IllegalActionException ex) {
                throw new IllegalActionException(this, ex,
                        "Failed to parse guard expression \"" + expr + "\"");
            }
        }
        Token token = parseTreeEvaluator.evaluateParseTree(_guardParseTree,
                fsmActor.getPortScope());
        if (token == null) {
            // FIXME: when could this happen??
            return false;
        }
View Full Code Here

Examples of ptolemy.data.expr.ParseTreeEvaluator.evaluateParseTree()

    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) {
            RecordToken recordToken = (RecordToken) token;
            Object[] labelObjects = recordToken.labelSet().toArray();
            String[] labels = new String[labelObjects.length];
View Full Code Here

Examples of ptolemy.data.expr.ParseTreeEvaluator.evaluateParseTree()

    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) {
            UnionToken unionToken = (UnionToken) token;
            _label = unionToken.label();
            _value = unionToken.value();
View Full Code Here

Examples of ptolemy.data.expr.ParseTreeEvaluator.evaluateParseTree()

                    if (parameter == null) {
                        String uniqueName = actor.uniqueName(parameterName);
                        parameter = new PtalonExpressionParameter(actor,
                                uniqueName);
                    }
                    Token result = _parseTreeEvaluator.evaluateParseTree(
                            _parseTree, _scope);
                    parameter.setToken(result);
                    // Validate the parameter to ensure that any value
                    // dependents are notified.
                    parameter.validate();
View Full Code Here

Examples of ptolemy.data.expr.ParseTreeEvaluator.evaluateParseTree()

                            } else {
                                parameter = new Parameter(actor, uniqueName);
                            }
                        }
                        try {
                            Token result = _parseTreeEvaluator
                                    .evaluateParseTree(parseTree, _scope);
                            parameter.setToken(result);
                            // We have to validate the parameter so that
                            // value dependents (if any) are notified of
                            // the new value, and so that attributeChanged()
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.