Package xbird.xquery.expr.flwr

Examples of xbird.xquery.expr.flwr.ForClause$ForAtEmurationSequence


                        _pullup.put(lc, bindings);
                    }
                }
            } else {
                if(type == Binding.FOR_CLAUSE) {
                    ForClause forClause = (ForClause) b;
                    int loopDepth = forClause.getLoopDepth();
                    if(loopDepth <= 1) {
                        _protectHook = true;
                    }
                    forClause.visit(this, ctxt);
                    _protectHook = false;
                } else {
                    b.visit(this, ctxt);
                }
            }
View Full Code Here


    [116] TypeDeclaration ::= "as" SequenceType
    [35PositionalVar   ::= "at" "$" VarName
    ************************************************************************/
    final public List<Binding> parseForClause() throws ParseException, XQueryException {
        final List<Binding> fors;
        ForClause clause;
        ForVariable var;
        Type varType = null;
        XQExpression expr;
        currentToken = jj_consume_token(ForVariable);
        currentToken = jj_consume_token(VarName);
        QualifiedName varName = QNameUtil.parse(currentToken.image, namespaceContext, currentModule.getNamespace());
        var = new ForVariable(varName);
        currentModule.putVariable(varName, var);
        clause = new ForClause(var);
        locate(clause);
        switch(jj_nt.kind) {
            case As:
                //TypeDeclaration?
                currentToken = jj_consume_token(As);
                varType = parseSequenceType();
                var.setType(varType);
                break;
            default:
                jj_la1[68] = jj_gen;
                ;
        }
        switch(jj_nt.kind) {
            case AtWord:
                //PositionalVar?
                currentToken = jj_consume_token(AtWord);
                currentToken = jj_consume_token(VariableIndicator);
                currentToken = jj_consume_token(VarName);
                QualifiedName posVarName = QNameUtil.parse(currentToken.image, namespaceContext, currentModule.getNamespace());
                PositionalVariable posVar = new PositionalVariable(posVarName);
                currentModule.putVariable(posVarName, posVar);
                clause.setPositionVariable(posVar);
                break;
            default:
                jj_la1[69] = jj_gen;
                ;
        }
        currentToken = jj_consume_token(In);
        expr = parseExprSingle();
        clause.setInExpr(expr);
        fors = new LinkedList<Binding>();
        fors.add(clause);
        label_10: while(true) {
            switch(jj_nt.kind) {
                case Comma:
                    ;
                    break;
                default:
                    jj_la1[70] = jj_gen;
                    break label_10;
            }
            //("," "$" VarName TypeDeclaration? PositionalVar? "in" ExprSingle)*
            currentToken = jj_consume_token(Comma);
            currentToken = jj_consume_token(VariableIndicator);
            currentToken = jj_consume_token(VarName);
            varName = QNameUtil.parse(currentToken.image, namespaceContext, currentModule.getNamespace());
            var = new ForVariable(varName);
            currentModule.putVariable(varName, var);
            clause = new ForClause(var);
            switch(jj_nt.kind) {
                case As:
                    //TypeDeclaration?
                    currentToken = jj_consume_token(As);
                    varType = parseSequenceType();
                    var.setType(varType);
                    break;
                default:
                    jj_la1[71] = jj_gen;
                    ;
            }
            switch(jj_nt.kind) {
                case AtWord:
                    //PositionalVar?
                    currentToken = jj_consume_token(AtWord);
                    currentToken = jj_consume_token(VariableIndicator);
                    currentToken = jj_consume_token(VarName);
                    QualifiedName posVarName = QNameUtil.parse(currentToken.image, namespaceContext, currentModule.getNamespace());
                    PositionalVariable posVar = new PositionalVariable(posVarName);
                    currentModule.putVariable(posVarName, posVar);
                    clause.setPositionVariable(posVar);
                    break;
                default:
                    jj_la1[72] = jj_gen;
                    ;
            }
            currentToken = jj_consume_token(In);
            expr = parseExprSingle();
            clause.setInExpr(expr);
            fors.add(clause);
        }
        {
            if(true)
                return fors;
View Full Code Here

                            }

                            FLWRExpr newFlwr = new FLWRExpr();
                            ForVariable forVar = new ForVariable();
                            forVar.setValue(funcall);
                            newFlwr.addClause(new ForClause(forVar));
                            VarRef varref = new VarRef(forVar);
                            steps.set(0, varref);
                            newFlwr.setFilteredReturnExpr(pathExpr);

                            MapExpr mapExpr = new MapExpr(colpath, forVar, newFlwr);
View Full Code Here

                        _pullup.put(lc, bindings);
                    }
                }
            } else {
                if(type == Binding.FOR_CLAUSE) {
                    ForClause forClause = (ForClause) b;
                    int loopDepth = forClause.getLoopDepth();
                    if(loopDepth <= 1) {
                        _protectHook = true;
                    }
                    forClause.visit(this, ctxt);
                    _protectHook = false;
                } else {
                    b.visit(this, ctxt);
                }
            }
View Full Code Here

     [116] TypeDeclaration ::= "as" SequenceType
     [35PositionalVar   ::= "at" "$" VarName
     ************************************************************************/
    final public List<Binding> parseForClause() throws ParseException, XQueryException {
        final List<Binding> fors;
        ForClause clause;
        ForVariable var;
        Type varType = null;
        XQExpression expr;
        currentToken = jj_consume_token(ForVariable);
        currentToken = jj_consume_token(VarName);
        QualifiedName varName = QNameUtil.parse(currentToken.image, namespaceContext, currentModule.getNamespace());
        var = new ForVariable(varName);
        currentModule.putVariable(varName, var);
        clause = new ForClause(var);
        locate(clause);
        switch(jj_nt.kind) {
            case As:
                //TypeDeclaration?
                currentToken = jj_consume_token(As);
                varType = parseSequenceType();
                var.setType(varType);
                break;
            default:
                jj_la1[65] = jj_gen;
                ;
        }
        switch(jj_nt.kind) {
            case AtWord:
                //PositionalVar?
                currentToken = jj_consume_token(AtWord);
                currentToken = jj_consume_token(VariableIndicator);
                currentToken = jj_consume_token(VarName);
                QualifiedName posVarName = QNameUtil.parse(currentToken.image, namespaceContext, currentModule.getNamespace());
                PositionalVariable posVar = new PositionalVariable(posVarName);
                currentModule.putVariable(posVarName, posVar);
                clause.setPositionVariable(posVar);
                break;
            default:
                jj_la1[66] = jj_gen;
                ;
        }
        currentToken = jj_consume_token(In);
        expr = parseExprSingle();
        clause.setInExpr(expr);
        fors = new LinkedList<Binding>();
        fors.add(clause);
        label_9: while(true) {
            switch(jj_nt.kind) {
                case Comma:
                    ;
                    break;
                default:
                    jj_la1[67] = jj_gen;
                    break label_9;
            }
            //("," "$" VarName TypeDeclaration? PositionalVar? "in" ExprSingle)*
            currentToken = jj_consume_token(Comma);
            currentToken = jj_consume_token(VariableIndicator);
            currentToken = jj_consume_token(VarName);
            varName = QNameUtil.parse(currentToken.image, namespaceContext, currentModule.getNamespace());
            var = new ForVariable(varName);
            currentModule.putVariable(varName, var);
            clause = new ForClause(var);
            switch(jj_nt.kind) {
                case As:
                    //TypeDeclaration?
                    currentToken = jj_consume_token(As);
                    varType = parseSequenceType();
                    var.setType(varType);
                    break;
                default:
                    jj_la1[68] = jj_gen;
                    ;
            }
            switch(jj_nt.kind) {
                case AtWord:
                    //PositionalVar?
                    currentToken = jj_consume_token(AtWord);
                    currentToken = jj_consume_token(VariableIndicator);
                    currentToken = jj_consume_token(VarName);
                    QualifiedName posVarName = QNameUtil.parse(currentToken.image, namespaceContext, currentModule.getNamespace());
                    PositionalVariable posVar = new PositionalVariable(posVarName);
                    currentModule.putVariable(posVarName, posVar);
                    clause.setPositionVariable(posVar);
                    break;
                default:
                    jj_la1[69] = jj_gen;
                    ;
            }
            currentToken = jj_consume_token(In);
            expr = parseExprSingle();
            clause.setInExpr(expr);
            fors.add(clause);
        }
        {
            if(true)
                return fors;
View Full Code Here

TOP

Related Classes of xbird.xquery.expr.flwr.ForClause$ForAtEmurationSequence

Copyright © 2018 www.massapicom. 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.