Examples of ASTPtRootNode


Examples of ptolemy.data.expr.ASTPtRootNode

     @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.ASTPtRootNode

     @exception IllegalActionException If an error occurs, or the
     *  string cannot be parsed into a function.
     */
    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);

View Full Code Here

Examples of ptolemy.data.expr.ASTPtRootNode

     @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.ASTPtRootNode

     @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.ASTPtRootNode

     @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

Examples of ptolemy.data.expr.ASTPtRootNode

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

        if (token instanceof IntMatrixToken) {
            int[][] value = ((IntMatrixToken) token).intMatrix();
            _initialize(value);
View Full Code Here

Examples of ptolemy.data.expr.ASTPtRootNode

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

        if (token instanceof DoubleMatrixToken) {
            double[][] value = ((DoubleMatrixToken) token).doubleMatrix();
            _initialize(value);
View Full Code Here

Examples of ptolemy.data.expr.ASTPtRootNode

            Map nameToType, JimpleBody body, Unit insertPoint) {
        Local local;

        try {
            PtParser parser = new PtParser();
            ASTPtRootNode parseTree = parser.generateParseTree(expression);
            ActorCodeGenerationScope scope = new ActorCodeGenerationScope(
                    entity, entityClass, nameToFieldOrLocal, nameToType, body,
                    insertPoint);
            ParseTreeCodeGenerator generator = new ParseTreeCodeGenerator();
            local = generator.generateCode(parseTree, body, insertPoint, scope);
View Full Code Here

Examples of ptolemy.data.expr.ASTPtRootNode

                }

                IOPort destination = (IOPort) nextDestination;
                boolean isInput = destination.isInput();
                Integer channel = (Integer) channels.next();
                ASTPtRootNode parseTree = (ASTPtRootNode) parseTrees.next();
                Token token;

                try {
                    token = _parseTreeEvaluator.evaluateParseTree(parseTree,
                            _scope);
View Full Code Here

Examples of ptolemy.data.expr.ASTPtRootNode

        try {
            // Note that the parser is NOT retained, since in most
            // cases the expression doesn't change, and the parser
            // requires a large amount of memory.
            PtParser parser = new PtParser();
            ASTPtRootNode parseTree = parser.generateParseTree(actor.expression
                    .getExpression());

            _cParseTreeCodeGenerator.evaluateParseTree(parseTree,
                    new VariableScope(actor));
        } catch (IllegalActionException ex) {
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.