Examples of jjtAccept()


Examples of org.adjective.syntactic.parser.node.BaseNode.jjtAccept()

            final Convert8To7Visitor converter = new Convert8To7Visitor();
            if (_classpath != null)
            {
                converter.setClassPath(new ClassPath(_classpath));
            }
            ast.jjtAccept(converter, null);
            ast.jjtAccept(new PrintSourceVisitor(), out);
        }
        finally
        {
            out.close();
View Full Code Here

Examples of org.apache.commons.jexl2.parser.JexlNode.jjtAccept()

        // reference
        int numChildren = node.jjtGetNumChildren();
        for (int i = 1; i < numChildren; i++) {
            JexlNode nindex = node.jjtGetChild(i);
            if (nindex instanceof JexlNode.Literal<?>) {
                object = nindex.jjtAccept(this, object);
            } else {
                Object index = nindex.jjtAccept(this, null);
                object = getAttribute(object, index, nindex);
            }
        }
View Full Code Here

Examples of org.apache.commons.jexl2.parser.JexlNode.jjtAccept()

        for (int i = 1; i < numChildren; i++) {
            JexlNode nindex = node.jjtGetChild(i);
            if (nindex instanceof JexlNode.Literal<?>) {
                object = nindex.jjtAccept(this, object);
            } else {
                Object index = nindex.jjtAccept(this, null);
                object = getAttribute(object, index, nindex);
            }
        }

        return object;
View Full Code Here

Examples of org.apache.commons.jexl2.parser.JexlNode.jjtAccept()

                while (itemsIterator.hasNext()) {
                    // set loopVariable to value of iterator
                    Object value = itemsIterator.next();
                    context.set(loopVariable.image, value);
                    // execute statement
                    result = statement.jjtAccept(this, data);
                }
            }
        }
        return result;
    }
View Full Code Here

Examples of org.apache.commons.jexl2.parser.JexlNode.jjtAccept()

    public Object visit(ASTJexlScript node, Object data) {
        int numChildren = node.jjtGetNumChildren();
        Object result = null;
        for (int i = 0; i < numChildren; i++) {
            JexlNode child = node.jjtGetChild(i);
            result = child.jjtAccept(this, data);
        }
        return result;
    }

    /** {@inheritDoc} */
 
View Full Code Here

Examples of org.apache.commons.jexl2.parser.JexlNode.jjtAccept()

            // integer literals may be part of an antish var name only if no bean was found so far
            if (result == null && theNode instanceof ASTIntegerLiteral) {
                isVariable &= v > 0;
            } else {
                isVariable &= (theNode instanceof ASTIdentifier);
                result = theNode.jjtAccept(this, result);
            }
            // if we get null back a result, check for an ant variable
            if (result == null && isVariable) {
                if (v == 0) {
                    variableName = new StringBuilder(node.jjtGetChild(0).image);
View Full Code Here

Examples of org.apache.commons.jexl2.parser.JexlNode.jjtAccept()

    }

    /** {@inheritDoc} */
    public Object visit(ASTUnaryMinusNode node, Object data) {
        JexlNode valNode = node.jjtGetChild(0);
        Object val = valNode.jjtAccept(this, data);
        if (val instanceof Byte) {
            byte valueAsByte = ((Byte) val).byteValue();
            return Byte.valueOf((byte) -valueAsByte);
        } else if (val instanceof Short) {
            short valueAsShort = ((Short) val).shortValue();
View Full Code Here

Examples of org.apache.commons.jexl2.parser.JexlNode.jjtAccept()

            JexlNode tree = parse(expr, null);
            JexlNode node = tree.jjtGetChild(0);
            Interpreter interpreter = createInterpreter(context);
            // set register
            interpreter.setRegisters(bean);
            return node.jjtAccept(interpreter, null);
        } catch (JexlException xjexl) {
            if (silent) {
                logger.warn(xjexl.getMessage(), xjexl.getCause());
                return null;
            }
View Full Code Here

Examples of org.apache.commons.jexl2.parser.JexlNode.jjtAccept()

            JexlNode tree = parse(expr, null);
            JexlNode node = tree.jjtGetChild(0);
            Interpreter interpreter = createInterpreter(context);
            // set the registers
            interpreter.setRegisters(bean, value);
            node.jjtAccept(interpreter, null);
        } catch (JexlException xjexl) {
            if (silent) {
                logger.warn(xjexl.getMessage(), xjexl.getCause());
                return;
            }
View Full Code Here

Examples of org.apache.commons.jexl2.parser.Node.jjtAccept()

    /** {@inheritDoc} */
    public Object visit(ASTWhileStatement node, Object data) {
        Object result = null;
        /* first objectNode is the expression */
        Node expressionNode = node.jjtGetChild(0);
        while (arithmetic.toBoolean(expressionNode.jjtAccept(this, data))) {
            // execute statement
            result = node.jjtGetChild(1).jjtAccept(this, data);
        }

        return result;
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.