You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2014/12/28 22:19:54 UTC

jena git commit: Sync grammar and Aggregatefactory refactoring.

Repository: jena
Updated Branches:
  refs/heads/master 85a337370 -> 13149d710


Sync grammar and Aggregatefactory refactoring.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/13149d71
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/13149d71
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/13149d71

Branch: refs/heads/master
Commit: 13149d7101c6a57b6e568320b86cc482401c1807
Parents: 85a3373
Author: Andy Seaborne <an...@apache.org>
Authored: Sun Dec 28 21:17:16 2014 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun Dec 28 21:17:16 2014 +0000

----------------------------------------------------------------------
 jena-arq/Grammar/arq.jj       | 6 +++---
 jena-arq/Grammar/master.jj    | 8 ++++----
 jena-arq/Grammar/sparql_11.jj | 4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/13149d71/jena-arq/Grammar/arq.jj
----------------------------------------------------------------------
diff --git a/jena-arq/Grammar/arq.jj b/jena-arq/Grammar/arq.jj
index 3bfc30b..e6af6a9 100644
--- a/jena-arq/Grammar/arq.jj
+++ b/jena-arq/Grammar/arq.jj
@@ -739,7 +739,7 @@ Expr FunctionCall() : { String fname ; ExprList a ; }
      if ( AggregateRegistry.isRegistered(fname) ) {
          if ( ! allowAggregatesInExpressions )
             throwParseException("Aggregate expression not legal at this point : "+fname, -1, -1) ;
-         Aggregator agg = AggregatorFactory.create(fname, a) ;
+         Aggregator agg = AggregatorFactory.createCustom(fname, a) ;
          Expr exprAgg = getQuery().allocAggregate(agg) ;
          return exprAgg ;
      }
@@ -1440,7 +1440,7 @@ Expr Aggregate() : { Aggregator agg = null ; String sep = null ;
     | t = <AGG>
           { String iri ; }
           iri = iri() a = ExpressionList()
-      { agg = AggregatorFactory.create(iri, a) ; }
+      { agg = AggregatorFactory.createCustom(iri, a) ; }
    )
    {
      if ( ! allowAggregatesInExpressions )
@@ -1461,7 +1461,7 @@ Expr iriOrFunction() : { String iri ; ExprList a = null ;
     if ( AggregateRegistry.isRegistered(iri) ) {
          if ( ! allowAggregatesInExpressions )
             throwParseException("Aggregate expression not legal at this point : "+iri, -1, -1) ;
-         Aggregator agg = AggregatorFactory.create(iri, a) ;
+         Aggregator agg = AggregatorFactory.createCustom(iri, a) ;
          Expr exprAgg = getQuery().allocAggregate(agg) ;
          return exprAgg ;
       }

http://git-wip-us.apache.org/repos/asf/jena/blob/13149d71/jena-arq/Grammar/master.jj
----------------------------------------------------------------------
diff --git a/jena-arq/Grammar/master.jj b/jena-arq/Grammar/master.jj
index 9b99be9..1c0cb28 100644
--- a/jena-arq/Grammar/master.jj
+++ b/jena-arq/Grammar/master.jj
@@ -1006,7 +1006,7 @@ Expr FunctionCall() : { String fname ; ExprList a ; }
          // aggregates
          if ( ! allowAggregatesInExpressions )
             throwParseException("Aggregate expression not legal at this point : "+fname, -1, -1) ;
-         Aggregator agg = AggregatorFactory.create(fname, a) ;
+         Aggregator agg = AggregatorFactory.createCustom(fname, a) ;
          Expr exprAgg = getQuery().allocAggregate(agg) ;
          return exprAgg ;
      }
@@ -1955,11 +1955,11 @@ Expr Aggregate() : { Aggregator agg = null ; String sep = null ;
     { agg = AggregatorFactory.createGroupConcat(distinct, expr, sep, ordered) ; }
 
 #ifdef ARQ
-    /* Temporary syntax*/
+    /* Explciit syntax (aggregate even if not registered) */
     | t = <AGG>
           { String iri ; }
           iri = iri() a = ExpressionList()
-      { agg = AggregatorFactory.create(iri, a) ; }
+      { agg = AggregatorFactory.createCustom(iri, a) ; }
 #endif
 
    )
@@ -1989,7 +1989,7 @@ Expr iriOrFunction() : { String iri ; ExprList a = null ;
          // aggregates
          if ( ! allowAggregatesInExpressions )
             throwParseException("Aggregate expression not legal at this point : "+iri, -1, -1) ;
-         Aggregator agg = AggregatorFactory.create(iri, a) ;
+         Aggregator agg = AggregatorFactory.createCustom(iri, a) ;
          Expr exprAgg = getQuery().allocAggregate(agg) ;
          return exprAgg ;
       }

http://git-wip-us.apache.org/repos/asf/jena/blob/13149d71/jena-arq/Grammar/sparql_11.jj
----------------------------------------------------------------------
diff --git a/jena-arq/Grammar/sparql_11.jj b/jena-arq/Grammar/sparql_11.jj
index f269018..c6bd821 100644
--- a/jena-arq/Grammar/sparql_11.jj
+++ b/jena-arq/Grammar/sparql_11.jj
@@ -688,7 +688,7 @@ Expr FunctionCall() : { String fname ; ExprList a ; }
      if ( AggregateRegistry.isRegistered(fname) ) {
          if ( ! allowAggregatesInExpressions )
             throwParseException("Aggregate expression not legal at this point : "+fname, -1, -1) ;
-         Aggregator agg = AggregatorFactory.create(fname, a) ;
+         Aggregator agg = AggregatorFactory.createCustom(fname, a) ;
          Expr exprAgg = getQuery().allocAggregate(agg) ;
          return exprAgg ;
      }
@@ -1344,7 +1344,7 @@ Expr iriOrFunction() : { String iri ; ExprList a = null ;
     if ( AggregateRegistry.isRegistered(iri) ) {
          if ( ! allowAggregatesInExpressions )
             throwParseException("Aggregate expression not legal at this point : "+iri, -1, -1) ;
-         Aggregator agg = AggregatorFactory.create(iri, a) ;
+         Aggregator agg = AggregatorFactory.createCustom(iri, a) ;
          Expr exprAgg = getQuery().allocAggregate(agg) ;
          return exprAgg ;
       }