Examples of inferTypes()


Examples of ptolemy.data.expr.ParseTreeTypeInference.inferTypes()

     */
    public FunctionToken(String init) throws IllegalActionException {
        PtParser parser = new PtParser();
        ASTPtRootNode tree = parser.generateParseTree(init);
        ParseTreeTypeInference inference = new ParseTreeTypeInference();
        inference.inferTypes(tree);

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

        if (token instanceof FunctionToken) {
            _function = ((FunctionToken) token)._function;
View Full Code Here

Examples of ptolemy.data.expr.ParseTreeTypeInference.inferTypes()

    public ptolemy.data.Token evaluateParseTree(ASTPtRootNode node,
            ParserScope scope) throws IllegalActionException {

        // Make a first pass to infer types.
        ParseTreeTypeInference typeInference = new ParseTreeTypeInference();
        typeInference.inferTypes(node, scope);

        _scope = scope;

        // Evaluate the value of the root node.
        node.visit(this);
View Full Code Here

Examples of ptolemy.data.expr.ParseTreeTypeInference.inferTypes()

    public ptolemy.data.Token evaluateParseTree(ASTPtRootNode node,
            ParserScope scope) throws IllegalActionException {

        // Make a first pass to infer types.
        ParseTreeTypeInference typeInference = new ParseTreeTypeInference();
        typeInference.inferTypes(node, scope);

        _scope = scope;

        // Evaluate the value of the root node.
        node.visit(this);
View Full Code Here

Examples of ptolemy.data.expr.ParseTreeTypeInference.inferTypes()

    public Local generateCode(ASTPtRootNode node, JimpleBody body,
            Unit insertPoint, CodeGenerationScope scope)
            throws IllegalActionException {
        ParseTreeTypeInference typeInference = new ParseTreeTypeInference();
        typeInference.inferTypes(node, scope);
        _scope = scope;
        _body = body;
        _nodeToLocal = new HashMap();
        _units = body.getUnits();
        _insertPoint = insertPoint;
View Full Code Here

Examples of ptolemy.data.expr.ParseTreeTypeInference.inferTypes()

        Collections.sort(freeVariableList);
        System.out.println("freeVariableList = " + freeVariableList);

        // Infer the type of the function.
        ParseTreeTypeInference inference = new ParseTreeTypeInference();
        inference.inferTypes(node, _scope);

        FunctionType functionType = (FunctionType) node.getType();

        ASTPtRootNode cloneTree = (ASTPtRootNode) node.getExpressionTree(); //.clone();
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.