Examples of foundErrors()


Examples of org.exist.xquery.parser.XQueryParser.foundErrors()

           
            final XQueryLexer lexer = new XQueryLexer(context, new StringReader(xpath));
            final XQueryParser parser = new XQueryParser(lexer);
            final XQueryTreeParser treeParser = new XQueryTreeParser(context);
            parser.xpath();
            if (parser.foundErrors()) {
                LOG.debug(parser.getErrorMessage());
                throw new RemoteException(parser.getErrorMessage());
            }
           
            final AST ast = parser.getAST();
View Full Code Here

Examples of org.exist.xquery.parser.XQueryParser.foundErrors()

    try {
            if (xpointer)
                parser.xpointer();
            else
                parser.xpath();
            if (parser.foundErrors()) {
              LOG.debug(parser.getErrorMessage());
              throw new StaticXQueryException(
                parser.getErrorMessage());
            }
View Full Code Here

Examples of org.exist.xquery.parser.XQueryParser.foundErrors()

      // TODO(pkaminsk2): why replicate XQuery.compile here?
      final XQueryLexer lexer = new XQueryLexer(context, new StringReader(select));
      final XQueryParser parser = new XQueryParser(lexer);
      final XQueryTreeParser treeParser = new XQueryTreeParser(context);
      parser.xpath();
      if (parser.foundErrors()) {
        throw new SAXException(parser.getErrorMessage());
      }

      final AST ast = parser.getAST();
     
View Full Code Here

Examples of org.exist.xquery.parser.XQueryParser.foundErrors()

            final XQueryContext context = new XQueryContext(pool, accessCtx);
            final XQueryLexer lexer = new XQueryLexer(context, new StringReader(sortExpr));
            final XQueryParser parser = new XQueryParser(lexer);
            final XQueryTreeParser treeParser = new XQueryTreeParser(context);
            parser.xpath();
            if (parser.foundErrors()) {
                //TODO : error ?
                LOG.debug(parser.getErrorMessage());
            }
            final AST ast = parser.getAST();
            LOG.debug("generated AST: " + ast.toStringTree());
View Full Code Here

Examples of org.exist.xquery.parser.XQueryParser.foundErrors()

                parser.xpointer();
            } else {
                parser.xpath();
            }
           
            if(parser.foundErrors()) {
              LOG.debug(parser.getErrorMessage());
              throw new StaticXQueryException(parser.getErrorMessage());
            }

            final AST ast = parser.getAST();
View Full Code Here

Examples of org.exist.xquery.parser.XQueryParser.foundErrors()

    final XQueryParser parser = new XQueryParser(lexer);
    // shares the context of the outer expression
    final XQueryTreeParser astParser = new XQueryTreeParser(pContext);
    try {
        parser.xpath();
      if(parser.foundErrors()) {
        logger.debug(parser.getErrorMessage());
        throw new XPathException(this, "error found while executing expression: " +
          parser.getErrorMessage());
      }
      final AST ast = parser.getAST();
View Full Code Here

Examples of org.exist.xquery.parser.XQueryParser.foundErrors()

        XQueryContext context = new XQueryContext(broker.getBrokerPool(), AccessContext.TEST);
        XQueryLexer lexer = new XQueryLexer(context, new StringReader(query));
        XQueryParser xparser = new XQueryParser(lexer);
        XQueryTreeParser treeParser = new XQueryTreeParser(context);
        xparser.xpath();
        if (xparser.foundErrors()) {
          System.err.println(xparser.getErrorMessage());
          return;
        }
 
        AST ast = xparser.getAST();
View Full Code Here

Examples of org.exist.xquery.parser.XQueryTreeParser.foundErrors()

           
            final AST ast = parser.getAST();
           
            final PathExpr expr = new PathExpr(context);
            treeParser.xpath(ast, expr);
            if (treeParser.foundErrors()) {
                LOG.debug(treeParser.getErrorMessage());
                throw new EXistException(treeParser.getErrorMessage());
            }
            LOG.info("query: " + ExpressionDumper.dump(expr));
            final long start = System.currentTimeMillis();
View Full Code Here

Examples of org.exist.xquery.parser.XQueryTreeParser.foundErrors()

            PathExpr expr = new PathExpr(context);
            if (xpointer)
                treeParser.xpointer(ast, expr);
            else
                treeParser.xpath(ast, expr);
            if (treeParser.foundErrors()) {
                throw new StaticXQueryException(
                treeParser.getErrorMessage(),
                treeParser.getLastException());
            }
View Full Code Here

Examples of org.exist.xquery.parser.XQueryTreeParser.foundErrors()

      if (LOG.isDebugEnabled())
        {LOG.debug("generated AST: " + ast.toStringTree());}

      final PathExpr expr = new PathExpr(context);
      treeParser.xpath(ast, expr);
      if (treeParser.foundErrors()) {
        throw new SAXException(treeParser.getErrorMessage());
      }
      expr.analyze(new AnalyzeContextInfo());
      final Sequence seq = expr.eval(null, null);
      return seq;
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.