Package xbird.xquery.expr

Examples of xbird.xquery.expr.XQExpression.visit()


        return expr;
    }

    public XQExpression visit(InstanceofOp op, XQueryContext ctxt) throws XQueryException {
        XQExpression e = op.getExpression();
        e.visit(this, ctxt);
        boolean isLoopInvariant = e.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(e);
            return hookLoopInvariant(op);
        }
View Full Code Here


        return call;
    }

    public LetClause visit(LetClause clause, XQueryContext ctxt) throws XQueryException {
        XQExpression e = clause.getExpression();
        e.visit(this, ctxt);
        boolean isLoopInvariant = e.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(e);
            clause.setLoopInvariant(true);
        }
View Full Code Here

    }

    public XQExpression visit(MultiplicativeExpr op, XQueryContext ctxt) throws XQueryException {
        boolean isLoopInvariant = true;
        XQExpression left = op.getLeftOperand();
        left.visit(this, ctxt);
        isLoopInvariant &= left.isLoopInvariant();
        XQExpression right = op.getRightOperand();
        right.visit(this, ctxt);
        isLoopInvariant &= right.isLoopInvariant();
        if(isLoopInvariant) {
View Full Code Here

        boolean isLoopInvariant = true;
        XQExpression left = op.getLeftOperand();
        left.visit(this, ctxt);
        isLoopInvariant &= left.isLoopInvariant();
        XQExpression right = op.getRightOperand();
        right.visit(this, ctxt);
        isLoopInvariant &= right.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(left);
            removeInvariants(right);
            return hookLoopInvariant(op);
View Full Code Here

        return constructor;
    }

    public XQExpression visit(NegativeExpr op, XQueryContext ctxt) throws XQueryException {
        XQExpression e = op.getExpression();
        e.visit(this, ctxt);
        boolean isLoopInvariant = e.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(e);
            return hookLoopInvariant(op);
        }
View Full Code Here

        return nt;
    }

    public XQExpression visit(OrderSpec spec, XQueryContext ctxt) throws XQueryException {
        XQExpression e = spec.getKeyExpr();
        e.visit(this, ctxt);
        boolean isLoopInvariant = e.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(e);
            return hookLoopInvariant(spec);
        }
View Full Code Here

        return variable;
    }

    public XQExpression visit(ParenthesizedExpr paren, XQueryContext ctxt) throws XQueryException {
        XQExpression e = paren.getExpr();
        e.visit(this, ctxt);
        boolean isLoopInvariant = e.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(e);
            return hookLoopInvariant(paren);
        }
View Full Code Here

    public XQExpression visit(PIConstructor constructor, XQueryContext ctxt) throws XQueryException {
        boolean isLoopInvariant = true;
        String target = constructor.getTarget();
        if(target == null) {
            XQExpression t = constructor.getTargetExpr();
            t.visit(this, ctxt);
            isLoopInvariant &= t.isLoopInvariant();
        }
        String content = constructor.getContent();
        if(content == null) {
            XQExpression c = constructor.getContentExpr();
View Full Code Here

            isLoopInvariant &= t.isLoopInvariant();
        }
        String content = constructor.getContent();
        if(content == null) {
            XQExpression c = constructor.getContentExpr();
            c.visit(this, ctxt);
            isLoopInvariant &= c.isLoopInvariant();
        }
        if(isLoopInvariant) {
            XQExpression t = constructor.getTargetExpr();
            if(t != null) {
View Full Code Here

        BindingVariable binding = expr.getBinding();
        visit(binding, ctxt);
        isLoopInvariant &= binding.isLoopInvariant();

        XQExpression cond = expr.getCondExpr();
        cond.visit(this, ctxt);
        isLoopInvariant &= cond.isLoopInvariant();

        if(isLoopInvariant) {
            removeInvariants(binding);
            removeInvariants(cond);
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.