Examples of ASTPtAssignmentNode


Examples of ptolemy.data.expr.ASTPtAssignmentNode

            Set set /* Dead Local Store: = new HashSet()*/;

            for (Iterator names = map.keySet().iterator(); names.hasNext();) {
                String name = (String) names.next();

                ASTPtAssignmentNode node = (ASTPtAssignmentNode) map.get(name);
                parseTree = node.getExpressionTree();
                set = variableCollector.collectFreeVariables(parseTree, scope);
                getReferredInputPorts(set, _outputActionReferredInputPorts);
            }
        }
    }
View Full Code Here

Examples of ptolemy.data.expr.ASTPtAssignmentNode

            Set set /* Dead Local Store: = new HashSet()*/;

            for (Iterator names = map.keySet().iterator(); names.hasNext();) {
                String name = (String) names.next();

                ASTPtAssignmentNode node = (ASTPtAssignmentNode) map.get(name);
                parseTree = node.getExpressionTree();
                set = variableCollector.collectFreeVariables(parseTree, scope);
                getReferredInputPorts(set, _setActionReferredInputPorts);
            }
        }
    }
View Full Code Here

Examples of ptolemy.data.expr.ASTPtAssignmentNode

        PtParser parser = new PtParser();
        Map map = parser.generateAssignmentMap(expression);

        for (Iterator names = map.keySet().iterator(); names.hasNext();) {
            String name = (String) names.next();
            ASTPtAssignmentNode node = (ASTPtAssignmentNode) map.get(name);

            // Parse the destination specification first.
            String completeDestinationSpec = node.getIdentifier();
            int openParen = completeDestinationSpec.indexOf("(");

            if (openParen > 0) {
                // A channel is being specified.
                int closeParen = completeDestinationSpec.indexOf(")");

                if (closeParen < openParen) {
                    throw new IllegalActionException(this,
                            "Malformed action: expected destination = "
                                    + "expression. Got: "
                                    + completeDestinationSpec);
                }

                _destinationNames.add(completeDestinationSpec.substring(0,
                        openParen).trim());

                String channelSpec = completeDestinationSpec.substring(
                        openParen + 1, closeParen);

                try {
                    _numbers.add(Integer.valueOf(channelSpec));
                } catch (NumberFormatException ex) {
                    throw new IllegalActionException(this,
                            "Malformed action: expected destination = "
                                    + "expression. Got: "
                                    + completeDestinationSpec);
                }
            } else {
                // No channel is specified.
                _destinationNames.add(completeDestinationSpec);
                _numbers.add(null);
            }

            // Parse the expression
            _parseTrees.add(node.getExpressionTree());
        }
    }
View Full Code Here

Examples of ptolemy.data.expr.ASTPtAssignmentNode

        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) {
            ASTPtAssignmentNode assignmentNode = (ASTPtAssignmentNode) node;
            targetName = assignmentNode.getIdentifier();
            node = assignmentNode.getExpressionTree();
        }

        final NamedObj model = ((ExpressionShellEffigy) getContainer())
                .getModel();
        ParserScope scope = new ModelScope() {
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.