Package org.dbwiki.data.query.xaql

Examples of org.dbwiki.data.query.xaql.XAQLSyntaxParser


 
  public XAQLQueryStatement(Database database, String queryExpression) throws org.dbwiki.exception.WikiException {
 
    _database = database;
   
    XAQLSyntaxParser parser = Parboiled.createParser(XAQLSyntaxParser.class);
   
    ParsingResult<XAQLToken> result = new ReportingParseRunner<XAQLToken>(parser.QueryStatement()).run(new DefaultInputBuffer(queryExpression.toCharArray()));

    if (result.hasErrors()) {
      throw new WikiQueryException(WikiQueryException.InvalidWikiQuery, queryExpression + "\n" + ErrorUtils.printParseErrors(result));
        } else {
        //result.parseTreeRoot.getValue().print("", "\t");
View Full Code Here


    // Only one of the options [child='...'] OR :<<node-index>> are allowed.
    //
   
    _database = database;
   
    XAQLSyntaxParser parser = Parboiled.createParser(XAQLSyntaxParser.class);
   
    ParsingResult<XAQLToken> result = new ReportingParseRunner<XAQLToken>(parser.XPathStatement()).run(new DefaultInputBuffer(pathExpression.toCharArray()));
   
    if (result.hasErrors()) {
      throw new WikiQueryException(WikiQueryException.InvalidWikiQuery, pathExpression + "\n" + ErrorUtils.printParseErrors(result));
        } else {
          _targetPath = new AbsoluteTargetPathGenerator().getTargetPath(database.schema().root(), database.versionIndex(), result.parseTreeRoot.getValue().children().firstElement().children().iterator());
View Full Code Here

TOP

Related Classes of org.dbwiki.data.query.xaql.XAQLSyntaxParser

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.