Examples of XQExpression


Examples of xbird.xquery.expr.XQExpression

    public XQExpression visit(VarRef ref, XQueryContext ctxt) throws XQueryException {
        Variable var = ref.getValue();
        if(var instanceof PathVariable) {
            visit((PathVariable) var, ctxt);
        } else if(var instanceof ParametricVariable) {
            XQExpression expr = ((ParametricVariable) var).getValue();
            if(expr == null) {
                buf.append(var);
            } else {
                visit(expr, ctxt);
            }
        } else if(var instanceof ThreadedVariable) {
            ThreadedVariable threadVar = (ThreadedVariable) var;
            buf.append(threadVar);
            buf.append(" := ");
            indentln();
            XQExpression expr = threadVar.getValue();
            assert (expr != null);
            visit(expr, ctxt);
            indent--;
        } else if(var instanceof ShippedVariable) {
            buf.append(var.getValue());
View Full Code Here

Examples of xbird.xquery.expr.XQExpression

    public XQExpression visit(BDQExpr expr, XQueryContext ctxt) throws XQueryException {
        buf.append("execute at ");
        buf.append(expr.getRemoteEndpoint());
        buf.append(" {");
        indentln();
        XQExpression body = expr.getBodyExpression();
        body.visit(this, ctxt);
        indent--;
        lineFeed();
        buf.append(" }");
        return expr;
    }
View Full Code Here

Examples of xbird.xquery.expr.XQExpression

                f.visit(this, ctxt);
            } while(f_itor.hasNext());
            indent--;
        }

        final XQExpression body = module.getExpression();
        if(body != null) {
            attrFeed("expression body");
            indentln();
            body.visit(this, ctxt);
            indent--;
        }

        return null;
    }
View Full Code Here

Examples of xbird.xquery.expr.XQExpression

    [2VersionDecl  ::=  <"xquery" "version"> StringLiteral ("encoding" StringLiteral)? Separator
    [3MainModule    ::= Prolog QueryBody
    [27] QueryBody    ::= Expr
    ************************************************************************/
    final public XQueryModule parseModule() throws ParseException, XQueryException {
        XQExpression expr = null;
        switch(jj_nt.kind) {
            case XQueryVersion:
                currentToken = jj_consume_token(XQueryVersion);
                currentToken = jj_consume_token(StringLiteralForVersion);
                String version = unquote(currentToken.image);
View Full Code Here

Examples of xbird.xquery.expr.XQExpression

     TODO: err:XPTY0004, err:XQST0054, err:XP0006
    ************************************************************************/
    final public void parseVarDecl() throws ParseException, XQueryException {
        final QualifiedName varName;
        Type varType = null;
        XQExpression valueExpr = null;
        boolean isExternal = false;
        currentToken = jj_consume_token(DefineVariable);
        // TODO spaces afrer "$"
        currentToken = jj_consume_token(VarName);
        varName = QNameUtil.parse(currentToken.image, namespaceContext, currentModule.getNamespace());
View Full Code Here

Examples of xbird.xquery.expr.XQExpression

    final public void parseFunctionDecl() throws ParseException, XQueryException {
        final UserFunction func;
        final QualifiedName funcName;
        List<ParametricVariable> paramList = Collections.<ParametricVariable> emptyList();
        Type returnType = Untyped.UNTYPED;
        final XQExpression funcBody;
        currentModule.pushVarScope();
        currentToken = jj_consume_token(DefineFunction);
        currentToken = jj_consume_token(QNameLpar);
        funcName = QNameUtil.parse(currentToken.image.substring(0, currentToken.image.length() - 1).trim(), namespaceContext, staticContext.getDefaultFunctionNamespace());
        switch(jj_nt.kind) {
View Full Code Here

Examples of xbird.xquery.expr.XQExpression

    /************************************************************************
    [31] Expr ::= ExprSingle ("," ExprSingle)*
    ************************************************************************/
    final public XQExpression parseExpr() throws ParseException, XQueryException {
        XQExpression expr = null;
        final List<XQExpression> exprs;
        expr = parseExprSingle();
        exprs = new LinkedList<XQExpression>();
        exprs.add(expr);
        label_6: while(true) {
View Full Code Here

Examples of xbird.xquery.expr.XQExpression

            | TypeswitchExpr
            | IfExpr
            | OrExpr
    ************************************************************************/
    final public XQExpression parseExprSingle() throws ParseException, XQueryException {
        final XQExpression expr;
        switch(jj_nt.kind) {
            case ForVariable:
            case LetVariable:
                expr = parseFLWRExpr();
                break;
View Full Code Here

Examples of xbird.xquery.expr.XQExpression

    [39] OrderSpecList ::= OrderSpec ("," OrderSpec)*
    ************************************************************************/
    final public XQExpression parseFLWRExpr() throws ParseException, XQueryException {
        final FLWRExpr flower = new FLWRExpr();
        List<Binding> bindings = null;
        XQExpression whereExpr = null;
        OrderSpec order = null;
        XQExpression returnExpr = null;
        currentModule.pushVarScope();
        locate(flower);
        label_7: while(true) {
            switch(jj_nt.kind) {
                case ForVariable:
View Full Code Here

Examples of xbird.xquery.expr.XQExpression

    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);
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.