Examples of generateParseTree()


Examples of ptolemy.data.expr.PtParser.generateParseTree()

            _expression = expression;

            // FIXME: Need better exception handling.
            try {
                PtParser parser = new PtParser();
                _parseTree = parser.generateParseTree(expression);
            } catch (Exception exception) {
                throw new RuntimeException("Error setting iteration count to "
                        + expression + ".\n" + exception.getMessage());
            }
        }
View Full Code Here

Examples of ptolemy.data.expr.PtParser.generateParseTree()

                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.PtParser.generateParseTree()

            _expression = expression;

            // FIXME: Need better exception handling.
            try {
                PtParser parser = new PtParser();
                _parseTree = parser.generateParseTree(expression);
            } catch (Exception exception) {
                throw new RuntimeException("Error setting iteration count to "
                        + expression + ".\n" + exception.getMessage());
            }
        }
View Full Code Here

Examples of ptolemy.data.expr.PtParser.generateParseTree()

        if (_guardParseTree == null) {
            String expr = getGuardExpression();
            // Parse the guard expression.
            PtParser parser = new PtParser();
            try {
                _guardParseTree = parser.generateParseTree(expr);
            } catch (IllegalActionException ex) {
                throw new IllegalActionException(this, ex,
                        "Failed to parse guard expression \"" + expr + "\"");
            }
        }
View Full Code Here

Examples of ptolemy.data.expr.PtParser.generateParseTree()

     @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.PtParser.generateParseTree()

     @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.PtParser.generateParseTree()

     @exception IllegalActionException If the string does
     *   not contain a parsable 2-D fix matrix.
     */
    public FixMatrixToken(String init) throws IllegalActionException {
        PtParser parser = new PtParser();
        ASTPtRootNode tree = parser.generateParseTree(init);
        Token token = (new ParseTreeEvaluator()).evaluateParseTree(tree);

        if (token instanceof FixMatrixToken) {
            FixPoint[][] value = ((FixMatrixToken) token).fixMatrix();
            _initialize(value, null);
View Full Code Here

Examples of ptolemy.data.expr.PtParser.generateParseTree()

     @exception IllegalActionException If the string does
     *   not contain a parsable fixed point number.
     */
    public FixToken(String init) throws IllegalActionException {
        PtParser parser = new PtParser();
        ASTPtRootNode tree = parser.generateParseTree(init);
        Token token = (new ParseTreeEvaluator()).evaluateParseTree(tree);

        if (token instanceof FixToken) {
            _value = ((FixToken) token).fixValue();
        } else {
View Full Code Here

Examples of ptolemy.data.expr.PtParser.generateParseTree()

     @exception IllegalActionException If the string does
     *   not contain a parsable 2-D complex matrix.
     */
    public ComplexMatrixToken(String init) throws IllegalActionException {
        PtParser parser = new PtParser();
        ASTPtRootNode tree = parser.generateParseTree(init);
        Token token = (new ParseTreeEvaluator()).evaluateParseTree(tree);

        if (token instanceof ComplexMatrixToken) {
            Complex[][] value = ((ComplexMatrixToken) token).complexMatrix();
            _initialize(value, DO_COPY);
View Full Code Here

Examples of ptolemy.data.expr.PtParser.generateParseTree()

     @exception IllegalActionException If the string does
     *   not contain a parsable 2-D long matrix.
     */
    public LongMatrixToken(String init) throws IllegalActionException {
        PtParser parser = new PtParser();
        ASTPtRootNode tree = parser.generateParseTree(init);
        Token token = (new ParseTreeEvaluator()).evaluateParseTree(tree);

        if (token instanceof LongMatrixToken) {
            long[][] value = ((LongMatrixToken) token).longMatrix();
            _initialize(value, DO_COPY);
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.