jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [4/4] git commit: Framework for work on JENA-803.
Date Sat, 01 Nov 2014 19:05:16 GMT
Framework for work on JENA-803.

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

Branch: refs/heads/master
Commit: f0cbd459ba1094445fb15d0bd293941d03fbc7e8
Parents: 5b8a7b8
Author: Andy Seaborne <andy@apache.org>
Authored: Sat Nov 1 19:04:59 2014 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Sat Nov 1 19:04:59 2014 +0000

----------------------------------------------------------------------
 .../jena/sparql/expr/aggregate/AggCustom.java   |  91 +++
 .../expr/aggregate/AggregatorFactory.java       |  68 +-
 .../hp/hpl/jena/sparql/lang/arq/ARQParser.java  | 803 +++++++++----------
 .../sparql/lang/arq/ARQParserConstants.java     |  17 -
 .../sparql/lang/arq/ARQParserTokenManager.java  |  17 -
 .../jena/sparql/lang/arq/JavaCharStream.java    |  19 +-
 .../jena/sparql/lang/arq/ParseException.java    |  19 +-
 .../com/hp/hpl/jena/sparql/lang/arq/Token.java  |  19 +-
 .../hpl/jena/sparql/lang/arq/TokenMgrError.java |  19 +-
 .../sparql/lang/sparql_11/JavaCharStream.java   |  19 +-
 .../sparql/lang/sparql_11/ParseException.java   |  19 +-
 .../sparql/lang/sparql_11/SPARQLParser11.java   |  92 +--
 .../lang/sparql_11/SPARQLParser11Constants.java |  17 -
 .../sparql_11/SPARQLParser11TokenManager.java   |  17 -
 .../hpl/jena/sparql/lang/sparql_11/Token.java   |  19 +-
 .../sparql/lang/sparql_11/TokenMgrError.java    |  19 +-
 16 files changed, 494 insertions(+), 780 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/f0cbd459/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggCustom.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggCustom.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggCustom.java
new file mode 100644
index 0000000..34e8212
--- /dev/null
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggCustom.java
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.hp.hpl.jena.sparql.expr.aggregate;
+
+import com.hp.hpl.jena.graph.Node ;
+import com.hp.hpl.jena.sparql.engine.binding.Binding ;
+import com.hp.hpl.jena.sparql.expr.Expr ;
+import com.hp.hpl.jena.sparql.expr.ExprList ;
+import com.hp.hpl.jena.sparql.expr.NodeValue ;
+import com.hp.hpl.jena.sparql.function.FunctionEnv ;
+
+/** Syntax element and framework execution for custom aggregates.  
+ */
+public class AggCustom extends AggregatorBase
+{
+    // See also ExprAggregator
+    
+    private final String iri ;
+    private final ExprList exprs ;
+
+    public AggCustom(String iri, ExprList exprs) { this.iri = iri ; this.exprs = exprs ; } 
+    
+    @Override
+    public Aggregator copy(Expr expr) { return this ; }
+    
+    @Override
+    public String toString() {
+        return "AGG <>" ;
+    }
+
+    @Override
+    public String toPrefixString() { return "(agg <"+iri+">)" ; }
+
+    @Override
+    public Accumulator createAccumulator()
+    { 
+        return createAccNull() ;
+    }
+
+    @Override
+    public Node getValueEmpty()     { return null ; } 
+
+    @Override
+    public Expr getExpr()           { return null ; }
+    
+    @Override
+    public int hashCode()   { return HC_AggNull ; }
+    @Override
+    public boolean equals(Object other)
+    {
+        if ( this == other ) return true ; 
+        return ( other instanceof AggCustom ) ;
+    } 
+
+    public static Accumulator createAccNull() { return new  AccCustom() ; }
+    
+    // ---- Accumulator
+    private static class AccCustom implements Accumulator
+    {
+        private int nBindings = 0 ;
+
+        public AccCustom() { }
+
+        @Override
+        public void accumulate(Binding binding, FunctionEnv functionEnv)
+        { nBindings++ ; }
+
+        @Override
+        public NodeValue getValue()
+        {
+            return null ;
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f0cbd459/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggregatorFactory.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggregatorFactory.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggregatorFactory.java
index aab2763..2204b71 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggregatorFactory.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggregatorFactory.java
@@ -16,64 +16,56 @@
  * limitations under the License.
  */
 
-package com.hp.hpl.jena.sparql.expr.aggregate;
-
-import com.hp.hpl.jena.sparql.expr.Expr ;
-import com.hp.hpl.jena.sparql.expr.ExprList ;
+package com.hp.hpl.jena.sparql.expr.aggregate ;
 
 import org.apache.jena.atlas.lib.NotImplemented ;
 import org.apache.jena.atlas.logging.Log ;
 
-public class AggregatorFactory
-{
-    public static Aggregator createCount(boolean distinct)
-    { 
+import com.hp.hpl.jena.sparql.expr.Expr ;
+import com.hp.hpl.jena.sparql.expr.ExprList ;
+
+public class AggregatorFactory {
+    public static Aggregator createCount(boolean distinct) {
         return distinct ? new AggCountDistinct() : new AggCount() ;
     }
 
-    public static Aggregator createCountExpr(boolean distinct, Expr expr)
-    { 
+    public static Aggregator createCountExpr(boolean distinct, Expr expr) {
         return distinct ? new AggCountVarDistinct(expr) : new AggCountVar(expr) ;
     }
-    
-    public static Aggregator createSum(boolean distinct, Expr expr)
-    { 
+
+    public static Aggregator createSum(boolean distinct, Expr expr) {
         return distinct ? new AggSumDistinct(expr) : new AggSum(expr) ;
     }
-    
-    public static Aggregator createMin(boolean distinct, Expr expr)
-    { 
+
+    public static Aggregator createMin(boolean distinct, Expr expr) {
         // Only remember it's DISTINCT for getting the printing right.
         return distinct ? new AggMinDistinct(expr) : new AggMin(expr) ;
     }
-    
-    public static Aggregator createMax(boolean distinct, Expr expr)
-    { 
-        return distinct ? new AggMaxDistinct(expr)  : new AggMax(expr) ;
+
+    public static Aggregator createMax(boolean distinct, Expr expr) {
+        return distinct ? new AggMaxDistinct(expr) : new AggMax(expr) ;
     }
-    
-    public static Aggregator createAvg(boolean distinct, Expr expr)
-    { 
+
+    public static Aggregator createAvg(boolean distinct, Expr expr) {
         return distinct ? new AggAvgDistinct(expr) : new AggAvg(expr) ;
     }
-        
-    public static Aggregator createSample(boolean distinct, Expr expr)
-    { 
+
+    public static Aggregator createSample(boolean distinct, Expr expr) {
         return distinct ? new AggSampleDistinct(expr) : new AggSample(expr) ;
     }
-    
-    public static Aggregator createGroupConcat(boolean distinct, Expr expr, String separator, ExprList orderedBy)
-    { 
-        if ( orderedBy != null && ! orderedBy.isEmpty())
-            throw new NotImplemented("GROUP_CONCAT / ORDER BY not implemented yet") ;        
+
+    public static Aggregator createGroupConcat(boolean distinct, Expr expr, String separator, ExprList orderedBy) {
+        if ( orderedBy != null && !orderedBy.isEmpty() )
+            throw new NotImplemented("GROUP_CONCAT / ORDER BY not implemented yet") ;
         return distinct ? new AggGroupConcatDistinct(expr, separator) : new AggGroupConcat(expr, separator) ;
     }
-    
-    public static Aggregator createAggNull() { return new AggNull() ; }
-    
-    private static Aggregator err(String label)
-    {
-        Log.fatal(AggregatorFactory.class, "Not implemented: "+label) ;
-        return null ;
+
+    public static Aggregator createAggNull() {
+        return new AggNull() ;
+    }
+
+    public static Aggregator create(java.lang.String iri, ExprList a) {
+        Log.fatal(AggregatorFactory.class, "Not implemented: custom aggregates (extedned syntax)") ;
+        return new AggCustom(iri, a) ;
     }
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/f0cbd459/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ARQParser.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ARQParser.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ARQParser.java
index cfebeec..e89e2c8 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ARQParser.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ARQParser.java
@@ -1,21 +1,4 @@
 /* Generated By:JavaCC: Do not edit this line. ARQParser.java */
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 package com.hp.hpl.jena.sparql.lang.arq ;
 import com.hp.hpl.jena.graph.* ;
 import com.hp.hpl.jena.query.* ;
@@ -31,13 +14,6 @@ import com.hp.hpl.jena.sparql.modify.request.* ;
 public class ARQParser extends ARQParserBase implements ARQParserConstants {
     boolean allowAggregatesInExpressions = false ;
 
-// // Common top for single entry point.
-// void Top(): {}
-// {
-//     ( Query() | Update() )
-//     <EOF>
-// }
-// Query only entry point
   final public void QueryUnit() throws ParseException {
     ByteOrderMark();
     startQuery() ;
@@ -131,7 +107,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
         getPrologue().setPrefix(s, iri) ;
   }
 
-// ---- Query type clauses
   final public void SelectQuery() throws ParseException {
     SelectClause();
     label_2:
@@ -534,8 +509,7 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
      getQuery().setQueryConstructType() ;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
     case LBRACE:
-      // Full form.
-          t = ConstructTemplate();
+      t = ConstructTemplate();
         getQuery().setConstructTemplate(t) ;
       label_4:
       while (true) {
@@ -604,7 +578,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
       SolutionModifier();
       t = new Template(acc.getBGP()) ;
       getQuery().setConstructTemplate(t) ;
-      // Create a query in the same shape as the query created by writing out in full.
       ElementPathBlock epb = new ElementPathBlock(acc.getBGP()) ;
       ElementGroup elg = new ElementGroup() ;
       elg.addElement(epb) ;
@@ -698,7 +671,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     SolutionModifier();
   }
 
-// ----
   final public void DatasetClause() throws ParseException {
     jj_consume_token(FROM);
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -720,7 +692,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
   final public void DefaultGraphClause() throws ParseException {
                               String iri ;
     iri = SourceSelector();
-    // This checks for duplicates
     getQuery().addGraphURI(iri) ;
   }
 
@@ -728,7 +699,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
                             String iri ;
     jj_consume_token(NAMED);
     iri = SourceSelector();
-    // This checks for duplicates
     getQuery().addNamedGraphURI(iri) ;
   }
 
@@ -1399,8 +1369,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     }
   }
 
-// SPARQL Update + transitional extensions for SPARQL/Update (the W3C submission)
-// Update only entry point
   final public void Update() throws ParseException {
     Prologue();
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -1627,13 +1595,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     throw new Error("Missing return statement in function");
   }
 
-// #ifdef ARQ
-// void Meta() : { QuadDataAccSink qd = new QuadDataAccSink() ; }
-// {
-//    <META> 
-//    QuadData(qd)
-// }
-// #endif
   final public void InsertData() throws ParseException {
                       QuadDataAccSink qd = createInsertDataSink() ; Token t ;
     t = jj_consume_token(INSERT_DATA);
@@ -1834,7 +1795,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     jj_consume_token(RBRACE);
   }
 
-//Ground data : As QuadPattern but don't allow variables.
   final public void QuadData(QuadDataAccSink acc) throws ParseException {
     jj_consume_token(LBRACE);
     Quads(acc);
@@ -1992,7 +1952,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     }
   }
 
-// ---- General Graph Pattern 
   final public Element GroupGraphPattern() throws ParseException {
                                 Element el = null ; Token t ;
     t = jj_consume_token(LBRACE);
@@ -2171,16 +2130,11 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     throw new Error("Missing return statement in function");
   }
 
-// -----
   final public Element GraphPatternNotTriples() throws ParseException {
                                      Element el = null ;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
     case LBRACE:
-      //    el = GroupGraphPattern()
-      //  |
-      //    el = UnionGraphPattern()
-      //  |
-         el = GroupOrUnionGraphPattern();
+      el = GroupOrUnionGraphPattern();
       break;
     case OPTIONAL:
       el = OptionalGraphPattern();
@@ -2221,7 +2175,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     throw new Error("Missing return statement in function");
   }
 
-// ---- Definitions of each pattern element
   final public Element OptionalGraphPattern() throws ParseException {
                                    Element el ;
     jj_consume_token(OPTIONAL);
@@ -2517,16 +2470,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     throw new Error("Missing return statement in function");
   }
 
-// Element UnionGraphPattern() : { Element el ; }
-// {
-//     <UNION>
-//     el = GroupGraphPattern()
-//     { return new ElementUnion(el) ; }
-// }
-// SPARQL 1.0: {pattern} UNION {pattern} UNION {pattern} ... :: 
-// SPARQL 1.1 may introduce: { pattern UNION pattern UNION ... }
-// G (union G)* can be a single group pattern
-// or a group pattern as part of an union.
   final public Element GroupOrUnionGraphPattern() throws ParseException {
       Element el = null ; ElementUnion el2 = null ;
     el = GroupGraphPattern();
@@ -2738,7 +2681,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     throw new Error("Missing return statement in function");
   }
 
-// -------- Construct patterns
   final public Template ConstructTemplate() throws ParseException {
                                  TripleCollectorBGP acc = new TripleCollectorBGP();
                                  Template t = new Template(acc.getBGP()) ;
@@ -2804,8 +2746,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     }
   }
 
-// -------- Triple lists with property and object lists
-// -------- Without paths: entry: TriplesSameSubject
   final public void TriplesSameSubject(TripleCollector acc) throws ParseException {
                                                  Node s ;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -2945,8 +2885,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     insert(tempAcc, mark, s, p, path, o) ; insert(acc, tempAcc) ;
   }
 
-// -------- BGPs with paths.
-// -------- Entry point: TriplesSameSubjectPath
   final public void TriplesSameSubjectPath(TripleCollector acc) throws ParseException {
                                                      Node s ;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -3102,9 +3040,7 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
 
   final public Node VerbSimple() throws ParseException {
                       Node p ;
-    // "a" now allowed in paths.
-      //( p = Var() | <KW_A> { p = nRDFtype ; } )
-      p = Var();
+    p = Var();
     {if (true) return p ;}
     throw new Error("Missing return statement in function");
   }
@@ -3134,8 +3070,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     insert(tempAcc, mark, s, p, path, o) ; insert(acc, tempAcc) ;
   }
 
-// End paths stuff.
-// -------- Paths
   final public Path PathUnit() throws ParseException {
                     Path p ;
     ByteOrderMark();
@@ -3145,7 +3079,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     throw new Error("Missing return statement in function");
   }
 
-// Weakest outermost
   final public Path Path() throws ParseException {
                 Path p ;
     p = PathAlternative();
@@ -3209,7 +3142,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     throw new Error("Missing return statement in function");
   }
 
-// Path unit element, no inverse
   final public Path PathElt() throws ParseException {
                    String str ; Node n ; Path p ;
     p = PathPrimary();
@@ -3228,7 +3160,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     throw new Error("Missing return statement in function");
   }
 
-// Path unit element, including inverse.
   final public Path PathEltOrInverse() throws ParseException {
                             String str ; Node n ; Path p ;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -3286,8 +3217,7 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
                            {if (true) return PathFactory.pathOneOrMoreN(p) ;}
         break;
       case INTEGER:
-        // {N} {N,M} {N,}
-                  i1 = Integer();
+        i1 = Integer();
         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
         case COMMA:
           jj_consume_token(COMMA);
@@ -3297,8 +3227,7 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
                 {if (true) return PathFactory.pathMod(p, i1, PathFactory.UNSET) ;}
             break;
           case INTEGER:
-            // case {N,M}
-                          i2 = Integer();
+            i2 = Integer();
             jj_consume_token(RBRACE);
                 {if (true) return PathFactory.pathMod(p, i1, i2) ;}
             break;
@@ -3489,9 +3418,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     throw new Error("Missing return statement in function");
   }
 
-// -------- Triple expansions
-// Anything that can stand in a node slot and which is
-// a number of triples
   final public Node TriplesNode(TripleCollectorMark acc) throws ParseException {
                                               Node n ;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -3550,7 +3476,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     throw new Error("Missing return statement in function");
   }
 
-// ------- RDF collections
   final public Node Collection(TripleCollectorMark acc) throws ParseException {
       Node listHead = nRDFnil ; Node lastCell = null ; int mark ; Node n ; Token t ;
     t = jj_consume_token(LPAREN);
@@ -3661,7 +3586,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     throw new Error("Missing return statement in function");
   }
 
-// -------- Nodes in a graph pattern or template
   final public Node GraphNode(TripleCollectorMark acc) throws ParseException {
                                             Node n ;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -3785,7 +3709,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     throw new Error("Missing return statement in function");
   }
 
-// Property (if no bNodes) + DESCRIBE
   final public Node VarOrIri() throws ParseException {
                    Node n = null ; String iri ;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -3876,7 +3799,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     throw new Error("Missing return statement in function");
   }
 
-// -------- Constraint syntax
   final public Expr Expression() throws ParseException {
                       Expr expr ;
     expr = ConditionalOrExpression();
@@ -4799,8 +4721,7 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
       {if (true) return new E_IsNumeric(expr) ;}
       break;
     case REGEX:
-      // Regular expression matcher
-          expr = RegexExpression();
+      expr = RegexExpression();
                                {if (true) return expr ;}
       break;
     case EXISTS:
@@ -5172,9 +5093,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     throw new Error("Missing return statement in function");
   }
 
-// See also FunctionCall.
-// The case of "q:name()" or "q:agg()" or just "q:name"
-// by expanding out FunctionCall()
   final public Expr iriOrFunction() throws ParseException {
                          String iri ; ExprList a = null ;
                          ExprList params = null ;
@@ -5415,8 +5333,7 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
       {if (true) return createBNode(t.image, t.beginLine, t.beginColumn) ;}
       break;
     case ANON:
-      //  <LBRACKET> <RBRACKET> { return createBNode(t.beginLine, t.beginColumn) ; }
-        t = jj_consume_token(ANON);
+      t = jj_consume_token(ANON);
                {if (true) return createBNode(t.beginLine, t.beginColumn) ;}
       break;
     default:
@@ -5475,16 +5392,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
-  private boolean jj_3R_131() {
-    if (jj_scan_token(IRIref)) return true;
-    return false;
-  }
-
-  private boolean jj_3_1() {
-    if (jj_3R_40()) return true;
-    return false;
-  }
-
   private boolean jj_3R_99() {
     if (jj_3R_111()) return true;
     return false;
@@ -5495,34 +5402,24 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
-  private boolean jj_3R_156() {
-    if (jj_scan_token(ANON)) return true;
-    return false;
-  }
-
   private boolean jj_3R_97() {
     if (jj_3R_109()) return true;
     return false;
   }
 
-  private boolean jj_3R_96() {
-    if (jj_scan_token(IS_NUMERIC)) return true;
+  private boolean jj_3R_123() {
     if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_155() {
-    if (jj_scan_token(BLANK_NODE_LABEL)) return true;
+  private boolean jj_3R_96() {
+    if (jj_scan_token(IS_NUMERIC)) return true;
+    if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_146() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_155()) {
-    jj_scanpos = xsp;
-    if (jj_3R_156()) return true;
-    }
+  private boolean jj_3R_131() {
+    if (jj_scan_token(IRIref)) return true;
     return false;
   }
 
@@ -5538,46 +5435,56 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
-  private boolean jj_3R_166() {
-    if (jj_scan_token(PNAME_NS)) return true;
+  private boolean jj_3R_156() {
+    if (jj_scan_token(ANON)) return true;
     return false;
   }
 
-  private boolean jj_3R_93() {
-    if (jj_scan_token(IS_URI)) return true;
-    if (jj_scan_token(LPAREN)) return true;
+  private boolean jj_3R_106() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(165)) {
+    jj_scanpos = xsp;
+    if (jj_3R_123()) return true;
+    }
     return false;
   }
 
-  private boolean jj_3R_165() {
-    if (jj_scan_token(PNAME_LN)) return true;
+  private boolean jj_3R_93() {
+    if (jj_scan_token(IS_URI)) return true;
+    if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_92() {
-    if (jj_scan_token(IS_IRI)) return true;
-    if (jj_scan_token(LPAREN)) return true;
+  private boolean jj_3R_155() {
+    if (jj_scan_token(BLANK_NODE_LABEL)) return true;
     return false;
   }
 
-  private boolean jj_3R_157() {
+  private boolean jj_3R_146() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_165()) {
+    if (jj_3R_155()) {
     jj_scanpos = xsp;
-    if (jj_3R_166()) return true;
+    if (jj_3R_156()) return true;
     }
     return false;
   }
 
+  private boolean jj_3R_92() {
+    if (jj_scan_token(IS_IRI)) return true;
+    if (jj_scan_token(LPAREN)) return true;
+    return false;
+  }
+
   private boolean jj_3R_91() {
     if (jj_scan_token(SAME_TERM)) return true;
     if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_102() {
-    if (jj_3R_115()) return true;
+  private boolean jj_3R_166() {
+    if (jj_scan_token(PNAME_NS)) return true;
     return false;
   }
 
@@ -5587,110 +5494,56 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
-  private boolean jj_3R_148() {
-    if (jj_3R_157()) return true;
-    return false;
-  }
-
   private boolean jj_3R_89() {
     if (jj_scan_token(STRLANG)) return true;
     if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_147() {
-    if (jj_3R_131()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_142() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_147()) {
-    jj_scanpos = xsp;
-    if (jj_3R_148()) return true;
-    }
+  private boolean jj_3R_165() {
+    if (jj_scan_token(PNAME_LN)) return true;
     return false;
   }
 
-  private boolean jj_3R_42() {
+  private boolean jj_3R_157() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_101()) {
+    if (jj_3R_165()) {
     jj_scanpos = xsp;
-    if (jj_3R_102()) return true;
+    if (jj_3R_166()) return true;
     }
     return false;
   }
 
-  private boolean jj_3R_101() {
-    if (jj_3R_114()) return true;
-    return false;
-  }
-
   private boolean jj_3R_88() {
     if (jj_scan_token(IF)) return true;
     if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3_4() {
-    if (jj_scan_token(DOT)) return true;
-    if (jj_3R_42()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_161() {
-    if (jj_scan_token(STRING_LITERAL_LONG2)) return true;
-    return false;
-  }
-
-  private boolean jj_3R_160() {
-    if (jj_scan_token(STRING_LITERAL_LONG1)) return true;
-    return false;
-  }
-
-  private boolean jj_3R_159() {
-    if (jj_scan_token(STRING_LITERAL2)) return true;
-    return false;
-  }
-
-  private boolean jj_3R_113() {
-    if (jj_3R_126()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_158() {
-    if (jj_scan_token(STRING_LITERAL1)) return true;
+  private boolean jj_3R_148() {
+    if (jj_3R_157()) return true;
     return false;
   }
 
-  private boolean jj_3R_87() {
-    if (jj_scan_token(CALL)) return true;
-    if (jj_scan_token(LPAREN)) return true;
+  private boolean jj_3R_147() {
+    if (jj_3R_131()) return true;
     return false;
   }
 
-  private boolean jj_3R_149() {
+  private boolean jj_3R_142() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_158()) {
-    jj_scanpos = xsp;
-    if (jj_3R_159()) {
-    jj_scanpos = xsp;
-    if (jj_3R_160()) {
+    if (jj_3R_147()) {
     jj_scanpos = xsp;
-    if (jj_3R_161()) return true;
-    }
-    }
+    if (jj_3R_148()) return true;
     }
     return false;
   }
 
-  private boolean jj_3R_126() {
-    if (jj_scan_token(PREFIX)) return true;
-    if (jj_scan_token(PNAME_NS)) return true;
-    if (jj_3R_131()) return true;
+  private boolean jj_3R_87() {
+    if (jj_scan_token(CALL)) return true;
+    if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
@@ -5700,8 +5553,8 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
-  private boolean jj_3R_154() {
-    if (jj_scan_token(FALSE)) return true;
+  private boolean jj_3R_141() {
+    if (jj_scan_token(NIL)) return true;
     return false;
   }
 
@@ -5711,24 +5564,24 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
+  private boolean jj_3R_140() {
+    if (jj_3R_146()) return true;
+    return false;
+  }
+
   private boolean jj_3R_84() {
     if (jj_scan_token(SHA512)) return true;
     if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_153() {
-    if (jj_scan_token(TRUE)) return true;
+  private boolean jj_3R_161() {
+    if (jj_scan_token(STRING_LITERAL_LONG2)) return true;
     return false;
   }
 
-  private boolean jj_3R_145() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_153()) {
-    jj_scanpos = xsp;
-    if (jj_3R_154()) return true;
-    }
+  private boolean jj_3R_139() {
+    if (jj_3R_145()) return true;
     return false;
   }
 
@@ -5738,90 +5591,115 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
+  private boolean jj_3R_160() {
+    if (jj_scan_token(STRING_LITERAL_LONG1)) return true;
+    return false;
+  }
+
+  private boolean jj_3R_138() {
+    if (jj_3R_144()) return true;
+    return false;
+  }
+
   private boolean jj_3R_82() {
     if (jj_scan_token(SHA256)) return true;
     if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_125() {
-    if (jj_scan_token(BASE)) return true;
-    if (jj_3R_131()) return true;
+  private boolean jj_3R_159() {
+    if (jj_scan_token(STRING_LITERAL2)) return true;
     return false;
   }
 
-  private boolean jj_3R_81() {
-    if (jj_scan_token(SHA1)) return true;
-    if (jj_scan_token(LPAREN)) return true;
+  private boolean jj_3R_137() {
+    if (jj_3R_143()) return true;
     return false;
   }
 
-  private boolean jj_3R_80() {
-    if (jj_scan_token(MD5)) return true;
+  private boolean jj_3R_81() {
+    if (jj_scan_token(SHA1)) return true;
     if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_175() {
-    if (jj_scan_token(DOUBLE_NEGATIVE)) return true;
+  private boolean jj_3R_158() {
+    if (jj_scan_token(STRING_LITERAL1)) return true;
     return false;
   }
 
-  private boolean jj_3R_112() {
-    if (jj_3R_125()) return true;
+  private boolean jj_3R_136() {
+    if (jj_3R_142()) return true;
     return false;
   }
 
-  private boolean jj_3R_100() {
+  private boolean jj_3R_133() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_112()) {
+    if (jj_3R_136()) {
     jj_scanpos = xsp;
-    if (jj_3R_113()) return true;
+    if (jj_3R_137()) {
+    jj_scanpos = xsp;
+    if (jj_3R_138()) {
+    jj_scanpos = xsp;
+    if (jj_3R_139()) {
+    jj_scanpos = xsp;
+    if (jj_3R_140()) {
+    jj_scanpos = xsp;
+    if (jj_3R_141()) return true;
+    }
+    }
+    }
+    }
     }
     return false;
   }
 
-  private boolean jj_3R_79() {
-    if (jj_scan_token(STRUUID)) return true;
-    if (jj_scan_token(NIL)) return true;
+  private boolean jj_3R_80() {
+    if (jj_scan_token(MD5)) return true;
+    if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_174() {
-    if (jj_scan_token(DECIMAL_NEGATIVE)) return true;
+  private boolean jj_3R_128() {
+    if (jj_3R_133()) return true;
     return false;
   }
 
-  private boolean jj_3R_78() {
-    if (jj_scan_token(UUID)) return true;
+  private boolean jj_3R_79() {
+    if (jj_scan_token(STRUUID)) return true;
     if (jj_scan_token(NIL)) return true;
     return false;
   }
 
-  private boolean jj_3R_173() {
-    if (jj_scan_token(INTEGER_NEGATIVE)) return true;
-    return false;
-  }
-
-  private boolean jj_3R_164() {
+  private boolean jj_3R_149() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_173()) {
+    if (jj_3R_158()) {
     jj_scanpos = xsp;
-    if (jj_3R_174()) {
+    if (jj_3R_159()) {
     jj_scanpos = xsp;
-    if (jj_3R_175()) return true;
+    if (jj_3R_160()) {
+    jj_scanpos = xsp;
+    if (jj_3R_161()) return true;
+    }
     }
     }
     return false;
   }
 
-  private boolean jj_3R_41() {
+  private boolean jj_3R_78() {
+    if (jj_scan_token(UUID)) return true;
+    if (jj_scan_token(NIL)) return true;
+    return false;
+  }
+
+  private boolean jj_3R_132() {
     Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_100()) { jj_scanpos = xsp; break; }
+    xsp = jj_scanpos;
+    if (jj_scan_token(14)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(15)) return true;
     }
     return false;
   }
@@ -5832,11 +5710,6 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
-  private boolean jj_3R_141() {
-    if (jj_scan_token(NIL)) return true;
-    return false;
-  }
-
   private boolean jj_3R_76() {
     if (jj_scan_token(TZ)) return true;
     if (jj_scan_token(LPAREN)) return true;
@@ -5849,13 +5722,8 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
-  private boolean jj_3R_140() {
-    if (jj_3R_146()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_123() {
-    if (jj_scan_token(LPAREN)) return true;
+  private boolean jj_3R_154() {
+    if (jj_scan_token(FALSE)) return true;
     return false;
   }
 
@@ -5865,58 +5733,30 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
-  private boolean jj_3R_172() {
-    if (jj_scan_token(DOUBLE_POSITIVE)) return true;
-    return false;
-  }
-
-  private boolean jj_3R_139() {
-    if (jj_3R_145()) return true;
-    return false;
-  }
-
   private boolean jj_3R_73() {
     if (jj_scan_token(MINUTES)) return true;
     if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_171() {
-    if (jj_scan_token(DECIMAL_POSITIVE)) return true;
-    return false;
-  }
-
-  private boolean jj_3R_138() {
-    if (jj_3R_144()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_72() {
-    if (jj_scan_token(HOURS)) return true;
-    if (jj_scan_token(LPAREN)) return true;
-    return false;
-  }
-
-  private boolean jj_3R_170() {
-    if (jj_scan_token(INTEGER_POSITIVE)) return true;
+  private boolean jj_3R_153() {
+    if (jj_scan_token(TRUE)) return true;
     return false;
   }
 
-  private boolean jj_3R_163() {
+  private boolean jj_3R_145() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_170()) {
-    jj_scanpos = xsp;
-    if (jj_3R_171()) {
+    if (jj_3R_153()) {
     jj_scanpos = xsp;
-    if (jj_3R_172()) return true;
-    }
+    if (jj_3R_154()) return true;
     }
     return false;
   }
 
-  private boolean jj_3R_137() {
-    if (jj_3R_143()) return true;
+  private boolean jj_3R_72() {
+    if (jj_scan_token(HOURS)) return true;
+    if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
@@ -5926,72 +5766,30 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
-  private boolean jj_3R_136() {
-    if (jj_3R_142()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_133() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_136()) {
-    jj_scanpos = xsp;
-    if (jj_3R_137()) {
-    jj_scanpos = xsp;
-    if (jj_3R_138()) {
-    jj_scanpos = xsp;
-    if (jj_3R_139()) {
-    jj_scanpos = xsp;
-    if (jj_3R_140()) {
-    jj_scanpos = xsp;
-    if (jj_3R_141()) return true;
-    }
-    }
-    }
-    }
-    }
-    return false;
-  }
-
   private boolean jj_3R_70() {
     if (jj_scan_token(MONTH)) return true;
     if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_106() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(165)) {
-    jj_scanpos = xsp;
-    if (jj_3R_123()) return true;
-    }
-    return false;
-  }
-
   private boolean jj_3R_69() {
     if (jj_scan_token(YEAR)) return true;
     if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_128() {
-    if (jj_3R_133()) return true;
+  private boolean jj_3R_175() {
+    if (jj_scan_token(DOUBLE_NEGATIVE)) return true;
     return false;
   }
 
-  private boolean jj_3R_169() {
-    if (jj_scan_token(DOUBLE)) return true;
+  private boolean jj_3R_174() {
+    if (jj_scan_token(DECIMAL_NEGATIVE)) return true;
     return false;
   }
 
-  private boolean jj_3R_132() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(14)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(15)) return true;
-    }
+  private boolean jj_3R_127() {
+    if (jj_3R_132()) return true;
     return false;
   }
 
@@ -6001,25 +5799,30 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
-  private boolean jj_3R_168() {
-    if (jj_scan_token(DECIMAL)) return true;
+  private boolean jj_3R_173() {
+    if (jj_scan_token(INTEGER_NEGATIVE)) return true;
     return false;
   }
 
-  private boolean jj_3R_167() {
-    if (jj_scan_token(INTEGER)) return true;
+  private boolean jj_3R_164() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_173()) {
+    jj_scanpos = xsp;
+    if (jj_3R_174()) {
+    jj_scanpos = xsp;
+    if (jj_3R_175()) return true;
+    }
+    }
     return false;
   }
 
-  private boolean jj_3R_162() {
+  private boolean jj_3R_114() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_167()) {
-    jj_scanpos = xsp;
-    if (jj_3R_168()) {
+    if (jj_3R_127()) {
     jj_scanpos = xsp;
-    if (jj_3R_169()) return true;
-    }
+    if (jj_3R_128()) return true;
     }
     return false;
   }
@@ -6036,8 +5839,13 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
-  private boolean jj_3R_152() {
-    if (jj_3R_164()) return true;
+  private boolean jj_3R_172() {
+    if (jj_scan_token(DOUBLE_POSITIVE)) return true;
+    return false;
+  }
+
+  private boolean jj_3R_171() {
+    if (jj_scan_token(DECIMAL_POSITIVE)) return true;
     return false;
   }
 
@@ -6047,13 +5855,21 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
-  private boolean jj_3R_151() {
-    if (jj_3R_163()) return true;
+  private boolean jj_3R_170() {
+    if (jj_scan_token(INTEGER_POSITIVE)) return true;
     return false;
   }
 
-  private boolean jj_3R_150() {
-    if (jj_3R_162()) return true;
+  private boolean jj_3R_163() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_170()) {
+    jj_scanpos = xsp;
+    if (jj_3R_171()) {
+    jj_scanpos = xsp;
+    if (jj_3R_172()) return true;
+    }
+    }
     return false;
   }
 
@@ -6070,26 +5886,13 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
   }
 
   private boolean jj_3R_62() {
-    if (jj_scan_token(LCASE)) return true;
-    if (jj_scan_token(LPAREN)) return true;
-    return false;
-  }
-
-  private boolean jj_3R_144() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_150()) {
-    jj_scanpos = xsp;
-    if (jj_3R_151()) {
-    jj_scanpos = xsp;
-    if (jj_3R_152()) return true;
-    }
-    }
+    if (jj_scan_token(LCASE)) return true;
+    if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_127() {
-    if (jj_3R_132()) return true;
+  private boolean jj_3R_169() {
+    if (jj_scan_token(DOUBLE)) return true;
     return false;
   }
 
@@ -6099,17 +5902,30 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
+  private boolean jj_3R_168() {
+    if (jj_scan_token(DECIMAL)) return true;
+    return false;
+  }
+
   private boolean jj_3R_60() {
     if (jj_3R_108()) return true;
     return false;
   }
 
-  private boolean jj_3R_114() {
+  private boolean jj_3R_167() {
+    if (jj_scan_token(INTEGER)) return true;
+    return false;
+  }
+
+  private boolean jj_3R_162() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_127()) {
+    if (jj_3R_167()) {
     jj_scanpos = xsp;
-    if (jj_3R_128()) return true;
+    if (jj_3R_168()) {
+    jj_scanpos = xsp;
+    if (jj_3R_169()) return true;
+    }
     }
     return false;
   }
@@ -6137,18 +5953,81 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
+  private boolean jj_3R_152() {
+    if (jj_3R_164()) return true;
+    return false;
+  }
+
   private boolean jj_3R_55() {
     if (jj_scan_token(FLOOR)) return true;
     if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
+  private boolean jj_3R_151() {
+    if (jj_3R_163()) return true;
+    return false;
+  }
+
+  private boolean jj_3_2() {
+    if (jj_scan_token(SEMICOLON)) return true;
+    if (jj_3R_41()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(130)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(131)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(138)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(133)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(134)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(135)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(132)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(143)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(126)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(125)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(144)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(127)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(128)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(129)) return true;
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    return false;
+  }
+
   private boolean jj_3R_54() {
     if (jj_scan_token(CEIL)) return true;
     if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
+  private boolean jj_3R_150() {
+    if (jj_3R_162()) return true;
+    return false;
+  }
+
   private boolean jj_3R_53() {
     if (jj_scan_token(ABS)) return true;
     if (jj_scan_token(LPAREN)) return true;
@@ -6166,8 +6045,27 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
-  private boolean jj_3R_143() {
-    if (jj_3R_149()) return true;
+  private boolean jj_3R_124() {
+    if (jj_scan_token(LBRACE)) return true;
+    return false;
+  }
+
+  private boolean jj_3R_144() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_150()) {
+    jj_scanpos = xsp;
+    if (jj_3R_151()) {
+    jj_scanpos = xsp;
+    if (jj_3R_152()) return true;
+    }
+    }
+    return false;
+  }
+
+  private boolean jj_3_3() {
+    if (jj_scan_token(DOT)) return true;
+    if (jj_3R_42()) return true;
     return false;
   }
 
@@ -6205,12 +6103,22 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
+  private boolean jj_3R_143() {
+    if (jj_3R_149()) return true;
+    return false;
+  }
+
   private boolean jj_3R_47() {
     if (jj_scan_token(DTYPE)) return true;
     if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
+  private boolean jj_3_1() {
+    if (jj_3R_40()) return true;
+    return false;
+  }
+
   private boolean jj_3R_46() {
     if (jj_scan_token(LANGMATCHES)) return true;
     if (jj_scan_token(LPAREN)) return true;
@@ -6409,12 +6317,22 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
+  private boolean jj_3R_134() {
+    if (jj_scan_token(LPAREN)) return true;
+    return false;
+  }
+
   private boolean jj_3_5() {
     if (jj_scan_token(SEMICOLON)) return true;
     if (jj_scan_token(SEPARATOR)) return true;
     return false;
   }
 
+  private boolean jj_3R_113() {
+    if (jj_3R_126()) return true;
+    return false;
+  }
+
   private boolean jj_3R_122() {
     if (jj_scan_token(GROUP_CONCAT)) return true;
     if (jj_scan_token(LPAREN)) return true;
@@ -6427,6 +6345,13 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
+  private boolean jj_3R_126() {
+    if (jj_scan_token(PREFIX)) return true;
+    if (jj_scan_token(PNAME_NS)) return true;
+    if (jj_3R_131()) return true;
+    return false;
+  }
+
   private boolean jj_3R_120() {
     if (jj_scan_token(AVG)) return true;
     if (jj_scan_token(LPAREN)) return true;
@@ -6445,14 +6370,39 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
+  private boolean jj_3R_125() {
+    if (jj_scan_token(BASE)) return true;
+    if (jj_3R_131()) return true;
+    return false;
+  }
+
   private boolean jj_3R_117() {
     if (jj_scan_token(SUM)) return true;
     if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_134() {
-    if (jj_scan_token(LPAREN)) return true;
+  private boolean jj_3R_112() {
+    if (jj_3R_125()) return true;
+    return false;
+  }
+
+  private boolean jj_3R_100() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_112()) {
+    jj_scanpos = xsp;
+    if (jj_3R_113()) return true;
+    }
+    return false;
+  }
+
+  private boolean jj_3R_41() {
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_100()) { jj_scanpos = xsp; break; }
+    }
     return false;
   }
 
@@ -6462,8 +6412,8 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
-  private boolean jj_3R_124() {
-    if (jj_scan_token(LBRACE)) return true;
+  private boolean jj_3R_135() {
+    if (jj_scan_token(LBRACKET)) return true;
     return false;
   }
 
@@ -6492,56 +6442,22 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
-  private boolean jj_3_3() {
-    if (jj_scan_token(DOT)) return true;
-    if (jj_3R_42()) return true;
+  private boolean jj_3R_130() {
+    if (jj_3R_135()) return true;
     return false;
   }
 
-  private boolean jj_3_2() {
-    if (jj_scan_token(SEMICOLON)) return true;
-    if (jj_3R_41()) return true;
+  private boolean jj_3R_129() {
+    if (jj_3R_134()) return true;
+    return false;
+  }
+
+  private boolean jj_3R_115() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_scan_token(130)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(131)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(138)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(133)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(134)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(135)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(132)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(143)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(126)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(125)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(144)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(127)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(128)) {
+    if (jj_3R_129()) {
     jj_scanpos = xsp;
-    if (jj_scan_token(129)) return true;
-    }
-    }
-    }
-    }
-    }
-    }
-    }
-    }
-    }
-    }
-    }
-    }
+    if (jj_3R_130()) return true;
     }
     return false;
   }
@@ -6558,34 +6474,29 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
-  private boolean jj_3R_135() {
-    if (jj_scan_token(LBRACKET)) return true;
-    return false;
-  }
-
-  private boolean jj_3R_130() {
-    if (jj_3R_135()) return true;
+  private boolean jj_3R_108() {
+    if (jj_scan_token(REPLACE)) return true;
+    if (jj_scan_token(LPAREN)) return true;
     return false;
   }
 
-  private boolean jj_3R_129() {
-    if (jj_3R_134()) return true;
+  private boolean jj_3R_102() {
+    if (jj_3R_115()) return true;
     return false;
   }
 
-  private boolean jj_3R_115() {
+  private boolean jj_3R_42() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_129()) {
+    if (jj_3R_101()) {
     jj_scanpos = xsp;
-    if (jj_3R_130()) return true;
+    if (jj_3R_102()) return true;
     }
     return false;
   }
 
-  private boolean jj_3R_108() {
-    if (jj_scan_token(REPLACE)) return true;
-    if (jj_scan_token(LPAREN)) return true;
+  private boolean jj_3R_101() {
+    if (jj_3R_114()) return true;
     return false;
   }
 
@@ -6595,6 +6506,12 @@ public class ARQParser extends ARQParserBase implements ARQParserConstants {
     return false;
   }
 
+  private boolean jj_3_4() {
+    if (jj_scan_token(DOT)) return true;
+    if (jj_3R_42()) return true;
+    return false;
+  }
+
   /** Generated Token Manager. */
   public ARQParserTokenManager token_source;
   JavaCharStream jj_input_stream;

http://git-wip-us.apache.org/repos/asf/jena/blob/f0cbd459/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ARQParserConstants.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ARQParserConstants.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ARQParserConstants.java
index 8c464b7..9fd4323 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ARQParserConstants.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ARQParserConstants.java
@@ -1,21 +1,4 @@
 /* Generated By:JavaCC: Do not edit this line. ARQParserConstants.java */
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 package com.hp.hpl.jena.sparql.lang.arq ;
 
 

http://git-wip-us.apache.org/repos/asf/jena/blob/f0cbd459/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ARQParserTokenManager.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ARQParserTokenManager.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ARQParserTokenManager.java
index 8cdd517..59633af 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ARQParserTokenManager.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ARQParserTokenManager.java
@@ -1,21 +1,4 @@
 /* Generated By:JavaCC: Do not edit this line. ARQParserTokenManager.java */
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 package com.hp.hpl.jena.sparql.lang.arq ;
 
 

http://git-wip-us.apache.org/repos/asf/jena/blob/f0cbd459/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/JavaCharStream.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/JavaCharStream.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/JavaCharStream.java
index c98e488..47ece90 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/JavaCharStream.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/JavaCharStream.java
@@ -1,22 +1,5 @@
 /* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 5.0 */
 /* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 package com.hp.hpl.jena.sparql.lang.arq ;
 
 /**
@@ -631,4 +614,4 @@ class JavaCharStream
   }
 
 }
-/* JavaCC - OriginalChecksum=8657a0c1739dcc9a24f078f8b8d765e9 (do not edit this line) */
+/* JavaCC - OriginalChecksum=a0b032359ea6be66529722664217e211 (do not edit this line) */

http://git-wip-us.apache.org/repos/asf/jena/blob/f0cbd459/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ParseException.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ParseException.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ParseException.java
index 070e041..9235b20 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ParseException.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/ParseException.java
@@ -1,22 +1,5 @@
 /* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */
 /* JavaCCOptions:KEEP_LINE_COL=null */
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 package com.hp.hpl.jena.sparql.lang.arq ;
 
 /**
@@ -201,4 +184,4 @@ public class ParseException extends Exception {
    }
 
 }
-/* JavaCC - OriginalChecksum=6c685e169c464d91a2dc04ce893e7f9c (do not edit this line) */
+/* JavaCC - OriginalChecksum=395eaa662bf12c2c5ae082e63c90d8eb (do not edit this line) */

http://git-wip-us.apache.org/repos/asf/jena/blob/f0cbd459/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/Token.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/Token.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/Token.java
index 1490432..fb23cf9 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/Token.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/Token.java
@@ -1,22 +1,5 @@
 /* Generated By:JavaCC: Do not edit this line. Token.java Version 5.0 */
 /* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 package com.hp.hpl.jena.sparql.lang.arq ;
 
 /**
@@ -145,4 +128,4 @@ public class Token implements java.io.Serializable {
   }
 
 }
-/* JavaCC - OriginalChecksum=ea172162311f70f07a19fba4615363b8 (do not edit this line) */
+/* JavaCC - OriginalChecksum=56e8aac58769d1ff63ee21f7e1e69901 (do not edit this line) */

http://git-wip-us.apache.org/repos/asf/jena/blob/f0cbd459/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/TokenMgrError.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/TokenMgrError.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/TokenMgrError.java
index b521af0..af9ae1f 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/TokenMgrError.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/arq/TokenMgrError.java
@@ -1,22 +1,5 @@
 /* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */
 /* JavaCCOptions: */
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 package com.hp.hpl.jena.sparql.lang.arq ;
 
 /** Token Manager Error. */
@@ -161,4 +144,4 @@ public class TokenMgrError extends Error
     this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
   }
 }
-/* JavaCC - OriginalChecksum=568020da8ff0b3dd8f9dfdc4b7a6bacc (do not edit this line) */
+/* JavaCC - OriginalChecksum=e0550897506c97963576bdece61d1560 (do not edit this line) */

http://git-wip-us.apache.org/repos/asf/jena/blob/f0cbd459/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/JavaCharStream.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/JavaCharStream.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/JavaCharStream.java
index 751caa8..7bdeb7f 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/JavaCharStream.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/JavaCharStream.java
@@ -1,22 +1,5 @@
 /* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 5.0 */
 /* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 package com.hp.hpl.jena.sparql.lang.sparql_11 ;
 
 /**
@@ -631,4 +614,4 @@ class JavaCharStream
   }
 
 }
-/* JavaCC - OriginalChecksum=e2669e419594770cbcc602b4d652a4a5 (do not edit this line) */
+/* JavaCC - OriginalChecksum=91bb8bd99abb51b9e4d2626ad9a6319d (do not edit this line) */

http://git-wip-us.apache.org/repos/asf/jena/blob/f0cbd459/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/ParseException.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/ParseException.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/ParseException.java
index 9652979..13d05f5 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/ParseException.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/ParseException.java
@@ -1,22 +1,5 @@
 /* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */
 /* JavaCCOptions:KEEP_LINE_COL=null */
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 package com.hp.hpl.jena.sparql.lang.sparql_11 ;
 
 /**
@@ -201,4 +184,4 @@ public class ParseException extends Exception {
    }
 
 }
-/* JavaCC - OriginalChecksum=33f31b3b2eb30284975fb9371df7d8e4 (do not edit this line) */
+/* JavaCC - OriginalChecksum=e4cec90b928c3396b622e2c5a5b499f9 (do not edit this line) */

http://git-wip-us.apache.org/repos/asf/jena/blob/f0cbd459/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/SPARQLParser11.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/SPARQLParser11.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/SPARQLParser11.java
index bcf9ca3..711a2c6 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/SPARQLParser11.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/SPARQLParser11.java
@@ -1,21 +1,4 @@
 /* Generated By:JavaCC: Do not edit this line. SPARQLParser11.java */
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 package com.hp.hpl.jena.sparql.lang.sparql_11 ;
 import com.hp.hpl.jena.graph.* ;
 import com.hp.hpl.jena.query.* ;
@@ -31,13 +14,6 @@ import com.hp.hpl.jena.sparql.modify.request.* ;
 public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11Constants {
     boolean allowAggregatesInExpressions = false ;
 
-// // Common top for single entry point.
-// void Top(): {}
-// {
-//     ( Query() | Update() )
-//     <EOF>
-// }
-// Query only entry point
   final public void QueryUnit() throws ParseException {
     ByteOrderMark();
     startQuery() ;
@@ -131,7 +107,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
         getPrologue().setPrefix(s, iri) ;
   }
 
-// ---- Query type clauses
   final public void SelectQuery() throws ParseException {
     SelectClause();
     label_2:
@@ -242,8 +217,7 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
      getQuery().setQueryConstructType() ;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
     case LBRACE:
-      // Full form.
-          t = ConstructTemplate();
+      t = ConstructTemplate();
         getQuery().setConstructTemplate(t) ;
       label_4:
       while (true) {
@@ -312,7 +286,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
       SolutionModifier();
       t = new Template(acc.getBGP()) ;
       getQuery().setConstructTemplate(t) ;
-      // Create a query in the same shape as the query created by writing out in full.
       ElementPathBlock epb = new ElementPathBlock(acc.getBGP()) ;
       ElementGroup elg = new ElementGroup() ;
       elg.addElement(epb) ;
@@ -406,7 +379,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     SolutionModifier();
   }
 
-// ----
   final public void DatasetClause() throws ParseException {
     jj_consume_token(FROM);
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -428,7 +400,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
   final public void DefaultGraphClause() throws ParseException {
                               String iri ;
     iri = SourceSelector();
-    // This checks for duplicates
     getQuery().addGraphURI(iri) ;
   }
 
@@ -436,7 +407,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
                             String iri ;
     jj_consume_token(NAMED);
     iri = SourceSelector();
-    // This checks for duplicates
     getQuery().addNamedGraphURI(iri) ;
   }
 
@@ -1095,9 +1065,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     }
   }
 
-// SPARQL Update + transitional extensions for SPARQL/Update (the W3C submission)
-// Update only entry point
-// Strict SPARQL 1.1 : mandatory separator, optional terminator.
   final public void Update() throws ParseException {
     Prologue();
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -1313,13 +1280,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     throw new Error("Missing return statement in function");
   }
 
-// #ifdef ARQ
-// void Meta() : { QuadDataAccSink qd = new QuadDataAccSink() ; }
-// {
-//    <META> 
-//    QuadData(qd)
-// }
-// #endif
   final public void InsertData() throws ParseException {
                       QuadDataAccSink qd = createInsertDataSink() ; Token t ;
     t = jj_consume_token(INSERT_DATA);
@@ -1520,7 +1480,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     jj_consume_token(RBRACE);
   }
 
-//Ground data : As QuadPattern but don't allow variables.
   final public void QuadData(QuadDataAccSink acc) throws ParseException {
     jj_consume_token(LBRACE);
     Quads(acc);
@@ -1700,7 +1659,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     }
   }
 
-// ---- General Graph Pattern 
   final public Element GroupGraphPattern() throws ParseException {
                                 Element el = null ; Token t ;
     t = jj_consume_token(LBRACE);
@@ -1876,16 +1834,11 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     throw new Error("Missing return statement in function");
   }
 
-// -----
   final public Element GraphPatternNotTriples() throws ParseException {
                                      Element el = null ;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
     case LBRACE:
-      //    el = GroupGraphPattern()
-      //  |
-      //    el = UnionGraphPattern()
-      //  |
-         el = GroupOrUnionGraphPattern();
+      el = GroupOrUnionGraphPattern();
       break;
     case OPTIONAL:
       el = OptionalGraphPattern();
@@ -1917,7 +1870,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     throw new Error("Missing return statement in function");
   }
 
-// ---- Definitions of each pattern element
   final public Element OptionalGraphPattern() throws ParseException {
                                    Element el ;
     jj_consume_token(OPTIONAL);
@@ -2184,16 +2136,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     throw new Error("Missing return statement in function");
   }
 
-// Element UnionGraphPattern() : { Element el ; }
-// {
-//     <UNION>
-//     el = GroupGraphPattern()
-//     { return new ElementUnion(el) ; }
-// }
-// SPARQL 1.0: {pattern} UNION {pattern} UNION {pattern} ... :: 
-// SPARQL 1.1 may introduce: { pattern UNION pattern UNION ... }
-// G (union G)* can be a single group pattern
-// or a group pattern as part of an union.
   final public Element GroupOrUnionGraphPattern() throws ParseException {
       Element el = null ; ElementUnion el2 = null ;
     el = GroupGraphPattern();
@@ -2403,7 +2345,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     throw new Error("Missing return statement in function");
   }
 
-// -------- Construct patterns
   final public Template ConstructTemplate() throws ParseException {
                                  TripleCollectorBGP acc = new TripleCollectorBGP();
                                  Template t = new Template(acc.getBGP()) ;
@@ -2491,8 +2432,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     }
   }
 
-// -------- Triple lists with property and object lists
-// -------- Without paths: entry: TriplesSameSubject
   final public void TriplesSameSubject(TripleCollector acc) throws ParseException {
                                                  Node s ;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -2632,8 +2571,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     insert(tempAcc, mark, s, p, path, o) ; insert(acc, tempAcc) ;
   }
 
-// -------- BGPs with paths.
-// -------- Entry point: TriplesSameSubjectPath
   final public void TriplesSameSubjectPath(TripleCollector acc) throws ParseException {
                                                      Node s ;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -2777,9 +2714,7 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
 
   final public Node VerbSimple() throws ParseException {
                       Node p ;
-    // "a" now allowed in paths.
-      //( p = Var() | <KW_A> { p = nRDFtype ; } )
-      p = Var();
+    p = Var();
     {if (true) return p ;}
     throw new Error("Missing return statement in function");
   }
@@ -2809,9 +2744,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     insert(tempAcc, mark, s, p, path, o) ; insert(acc, tempAcc) ;
   }
 
-// End paths stuff.
-// -------- Paths
-// Weakest outermost
   final public Path Path() throws ParseException {
                 Path p ;
     p = PathAlternative();
@@ -2861,7 +2793,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     throw new Error("Missing return statement in function");
   }
 
-// Path unit element, no inverse
   final public Path PathElt() throws ParseException {
                    String str ; Node n ; Path p ;
     p = PathPrimary();
@@ -2879,7 +2810,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     throw new Error("Missing return statement in function");
   }
 
-// Path unit element, including inverse.
   final public Path PathEltOrInverse() throws ParseException {
                             String str ; Node n ; Path p ;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -3058,9 +2988,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     throw new Error("Missing return statement in function");
   }
 
-// -------- Triple expansions
-// Anything that can stand in a node slot and which is
-// a number of triples
   final public Node TriplesNode(TripleCollectorMark acc) throws ParseException {
                                               Node n ;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -3119,7 +3046,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     throw new Error("Missing return statement in function");
   }
 
-// ------- RDF collections
   final public Node Collection(TripleCollectorMark acc) throws ParseException {
       Node listHead = nRDFnil ; Node lastCell = null ; int mark ; Node n ; Token t ;
     t = jj_consume_token(LPAREN);
@@ -3230,7 +3156,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     throw new Error("Missing return statement in function");
   }
 
-// -------- Nodes in a graph pattern or template
   final public Node GraphNode(TripleCollectorMark acc) throws ParseException {
                                             Node n ;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -3354,7 +3279,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     throw new Error("Missing return statement in function");
   }
 
-// Property (if no bNodes) + DESCRIBE
   final public Node VarOrIri() throws ParseException {
                    Node n = null ; String iri ;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -3445,7 +3369,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     throw new Error("Missing return statement in function");
   }
 
-// -------- Constraint syntax
   final public Expr Expression() throws ParseException {
                       Expr expr ;
     expr = ConditionalOrExpression();
@@ -4336,8 +4259,7 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
       {if (true) return new E_IsNumeric(expr) ;}
       break;
     case REGEX:
-      // Regular expression matcher
-          expr = RegexExpression();
+      expr = RegexExpression();
                                {if (true) return expr ;}
       break;
     case EXISTS:
@@ -4679,9 +4601,6 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
     throw new Error("Missing return statement in function");
   }
 
-// See also FunctionCall.
-// The case of "q:name()" or "q:agg()" or just "q:name"
-// by expanding out FunctionCall()
   final public Expr iriOrFunction() throws ParseException {
                          String iri ; ExprList a = null ;
                          ExprList params = null ;
@@ -4922,8 +4841,7 @@ public class SPARQLParser11 extends SPARQLParser11Base implements SPARQLParser11
       {if (true) return createBNode(t.image, t.beginLine, t.beginColumn) ;}
       break;
     case ANON:
-      //  <LBRACKET> <RBRACKET> { return createBNode(t.beginLine, t.beginColumn) ; }
-        t = jj_consume_token(ANON);
+      t = jj_consume_token(ANON);
                {if (true) return createBNode(t.beginLine, t.beginColumn) ;}
       break;
     default:

http://git-wip-us.apache.org/repos/asf/jena/blob/f0cbd459/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/SPARQLParser11Constants.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/SPARQLParser11Constants.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/SPARQLParser11Constants.java
index f6c64bc..3b2be6a 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/SPARQLParser11Constants.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/SPARQLParser11Constants.java
@@ -1,21 +1,4 @@
 /* Generated By:JavaCC: Do not edit this line. SPARQLParser11Constants.java */
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 package com.hp.hpl.jena.sparql.lang.sparql_11 ;
 
 

http://git-wip-us.apache.org/repos/asf/jena/blob/f0cbd459/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/SPARQLParser11TokenManager.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/SPARQLParser11TokenManager.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/SPARQLParser11TokenManager.java
index 301d35f..122c9a3 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/SPARQLParser11TokenManager.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/SPARQLParser11TokenManager.java
@@ -1,21 +1,4 @@
 /* Generated By:JavaCC: Do not edit this line. SPARQLParser11TokenManager.java */
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 package com.hp.hpl.jena.sparql.lang.sparql_11 ;
 
 

http://git-wip-us.apache.org/repos/asf/jena/blob/f0cbd459/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/Token.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/Token.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/Token.java
index 5ea70fa..601b8c2 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/Token.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/Token.java
@@ -1,22 +1,5 @@
 /* Generated By:JavaCC: Do not edit this line. Token.java Version 5.0 */
 /* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 package com.hp.hpl.jena.sparql.lang.sparql_11 ;
 
 /**
@@ -145,4 +128,4 @@ public class Token implements java.io.Serializable {
   }
 
 }
-/* JavaCC - OriginalChecksum=115ac7742d64762750fbb767cca0b00d (do not edit this line) */
+/* JavaCC - OriginalChecksum=5c2fdaf8c1922d90ffd35e0e3347f8a1 (do not edit this line) */

http://git-wip-us.apache.org/repos/asf/jena/blob/f0cbd459/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/TokenMgrError.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/TokenMgrError.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/TokenMgrError.java
index 3f28793..86fb29d 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/TokenMgrError.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/lang/sparql_11/TokenMgrError.java
@@ -1,22 +1,5 @@
 /* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */
 /* JavaCCOptions: */
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
 package com.hp.hpl.jena.sparql.lang.sparql_11 ;
 
 /** Token Manager Error. */
@@ -161,4 +144,4 @@ public class TokenMgrError extends Error
     this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
   }
 }
-/* JavaCC - OriginalChecksum=949428b4288fc8b5b9fe86ea8dfe3cad (do not edit this line) */
+/* JavaCC - OriginalChecksum=41e4390f78fa6b404b39840a0a206ba2 (do not edit this line) */


Mime
View raw message