Examples of collectFreeVariables()


Examples of ptolemy.data.expr.ParseTreeFreeVariableCollector.collectFreeVariables()

            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.ParseTreeFreeVariableCollector.collectFreeVariables()

            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.ParseTreeFreeVariableCollector.collectFreeVariables()

            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);
        }

        return transitionsReferredInputPorts;
    }
View Full Code Here

Examples of ptolemy.data.expr.ParseTreeFreeVariableCollector.collectFreeVariables()

                            // the new value, and so that attributeChanged()
                            // is called on the actor.
                            parameter.validate();
                        } catch (IllegalActionException ex) {
                            ParseTreeFreeVariableCollector collector = new ParseTreeFreeVariableCollector();
                            Set expressionVariables = collector
                                    .collectFreeVariables(parseTree);
                            Set scopeVariables = _scope.identifierSet();
                            List<String> excludedVariables = new LinkedList<String>();
                            for (Object variable : expressionVariables) {
                                if (variable instanceof String) {
View Full Code Here

Examples of ptolemy.data.expr.ParseTreeFreeVariableCollector.collectFreeVariables()

                        }
                    } catch (ClassCastException ex) {
                        Settable parameter = (Settable) actor
                                .getAttribute(parameterName);
                        ParseTreeFreeVariableCollector collector = new ParseTreeFreeVariableCollector();
                        Set expressionVariables = collector
                                .collectFreeVariables(parseTree);
                        Set scopeVariables = _scope.identifierSet();
                        List<String> excludedVariables = new LinkedList<String>();
                        for (Object variable : expressionVariables) {
                            if (variable instanceof String) {
View Full Code Here

Examples of ptolemy.data.expr.ParseTreeFreeVariableCollector.collectFreeVariables()

                root = parser.generateStringParseTree(expression);
            } else {
                root = parser.generateParseTree(expression);
            }

            Set freeIdentifiers = new HashSet(collector
                    .collectFreeVariables(root));

            // Identifiers that reference other variables in the same container
            // are bound, not free.
            Set tempSet = new HashSet(variableNames);
View Full Code Here

Examples of ptolemy.data.expr.ParseTreeFreeVariableCollector.collectFreeVariables()

        // Get the free variables of the function definition.  These
        // will be turned into constructor arguments of the class
        // representing the function closure.  This takes the role of
        // Specialization of parse trees.
        ParseTreeFreeVariableCollector collector = new ParseTreeFreeVariableCollector();
        List freeVariableList = new LinkedList(collector
                .collectFreeVariables(node));
        Collections.sort(freeVariableList);
        System.out.println("freeVariableList = " + freeVariableList);

        // Infer the type of the function.
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.