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/11/01 20:05:13 UTC
[1/4] git commit: Remove some white space.
Repository: jena
Updated Branches:
refs/heads/master bcb07f177 -> f0cbd459b
Remove some white space.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/c2fc9f54
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/c2fc9f54
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/c2fc9f54
Branch: refs/heads/master
Commit: c2fc9f5493d08e60c3c95bda1b22a55dcb09e8dc
Parents: bcb07f1
Author: Andy Seaborne <an...@apache.org>
Authored: Sat Nov 1 18:48:01 2014 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Sat Nov 1 18:48:01 2014 +0000
----------------------------------------------------------------------
.../src/main/java/com/hp/hpl/jena/sparql/algebra/Transformer.java | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/c2fc9f54/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/Transformer.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/Transformer.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/Transformer.java
index a60e4bf..9ade24f 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/Transformer.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/Transformer.java
@@ -303,7 +303,6 @@ public class Transformer
if ( varExpr != varExpr2 )
changed = true ;
-
List<ExprAggregator> aggs = opGroup.getAggregators() ;
List<ExprAggregator> aggs2 = aggs ;
[3/4] git commit: Avoid C-related material getting into cpp/javacc
output.
Posted by an...@apache.org.
Avoid C-related material getting into cpp/javacc output.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/5b8a7b85
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/5b8a7b85
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/5b8a7b85
Branch: refs/heads/master
Commit: 5b8a7b85b612edfb9d14b19cbb4284ff692477d1
Parents: 47c7f4b
Author: Andy Seaborne <an...@apache.org>
Authored: Sat Nov 1 19:02:17 2014 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Sat Nov 1 19:02:17 2014 +0000
----------------------------------------------------------------------
jena-arq/Grammar/arq.jj | 275 ++-----------------------------------
jena-arq/Grammar/grammar | 6 +-
jena-arq/Grammar/master.jj | 34 +++--
jena-arq/Grammar/sparql_11.jj | 247 ++-------------------------------
4 files changed, 41 insertions(+), 521 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/5b8a7b85/jena-arq/Grammar/arq.jj
----------------------------------------------------------------------
diff --git a/jena-arq/Grammar/arq.jj b/jena-arq/Grammar/arq.jj
index 10c6419..a7cedc1 100644
--- a/jena-arq/Grammar/arq.jj
+++ b/jena-arq/Grammar/arq.jj
@@ -1,85 +1,10 @@
-/* Copyright (C) 1991-2014 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-/* This header is separate from features.h so that the compiler can
- include it implicitly at the start of every compilation. It must
- not itself include <features.h> or any other header that includes
- <features.h> because the implicit include comes before any feature
- test macros that may be defined in a source file before it first
- explicitly includes a system header. GCC knows the name of this
- header in order to preinclude it. */
-/* glibc's intent is to support the IEC 559 math functionality, real
- and complex. If the GCC (4.9 and later) predefined macros
- specifying compiler intent are available, use them to determine
- whether the overall intent is to support these features; otherwise,
- presume an older compiler has intent to support these features and
- define these macros by default. */
-/* wchar_t uses ISO/IEC 10646 (2nd ed., published 2011-03-15) /
- Unicode 6.0. */
-/* We do not support C11 <threads.h>. */
-/**
- * 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.
- */
-// ARQ/SPARQL 1.1 Grammar - native syntax for the query engine
options
{
- // \ u processed in the input stream
- // SPARQL 1.0
JAVA_UNICODE_ESCAPE = true ;
UNICODE_INPUT = false ;
-// // \ u processed after parsing.
-// // strings, prefix names, IRIs
-// JAVA_UNICODE_ESCAPE = false ;
-// UNICODE_INPUT = true ;
STATIC = false ;
-// DEBUG_PARSER = true ;
-// DEBUG_TOKEN_MANAGER = true ;
}
PARSER_BEGIN(ARQParser)
-/**
- * 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.* ;
@@ -95,13 +20,6 @@ public class ARQParser extends ARQParserBase
boolean allowAggregatesInExpressions = false ;
}
PARSER_END(ARQParser)
-// // Common top for single entry point.
-// void Top(): {}
-// {
-// ( Query() | Update() )
-// <EOF>
-// }
-// Query only entry point
void QueryUnit(): { }
{
ByteOrderMark()
@@ -113,9 +31,6 @@ void Query() : { }
{
Prologue()
( SelectQuery() | ConstructQuery() | DescribeQuery() | AskQuery()
-// #ifdef ARQ
-// | JsonTemplateQuery()
-// #endif
)
ValuesClause()
}
@@ -146,7 +61,6 @@ void PrefixDecl() : { Token t ; String iri ; }
{ String s = fixupPrefix(t.image, t.beginLine, t.beginColumn) ;
getPrologue().setPrefix(s, iri) ; }
}
-// ---- Query type clauses
void SelectQuery() : { }
{
SelectClause()
@@ -173,7 +87,6 @@ void SelectClause() : { Var v ; Expr expr ; Node n ; }
(
v = Var() { getQuery().addResultVar(v) ; }
|
- // Expressions without ()
( LOOKAHEAD(2)
expr = BuiltInCall() { getQuery().addResultVar((Var)null, expr) ; }
| expr = FunctionCall() { getQuery().addResultVar((Var)null, expr) ; }
@@ -181,12 +94,7 @@ void SelectClause() : { Var v ; Expr expr ; Node n ; }
| n = NumericLiteral() { getQuery().addResultVar((Var)null, NodeValue.makeNode(n)) ; }
| n = BooleanLiteral() { getQuery().addResultVar((Var)null, NodeValue.makeNode(n)) ; }
)
- // @@ PROBLEMS: expr = FunctionCall()
- // <uri>(?x)
- // looks like a function call and also a "<uri> ( ?v )"
- //| expr = FunctionCall() { getQuery().addResultVar((Var)null, expr) ; }
|
- // Expressions with ()
(
{ v = null ; }
<LPAREN>
@@ -205,29 +113,17 @@ void SelectClause() : { Var v ; Expr expr ; Node n ; }
void ConstructQuery() : { Template t ;
TripleCollectorBGP acc = new TripleCollectorBGP() ; }
{
-// #ifndef ARQ
-// <CONSTRUCT>
-// { getQuery().setQueryConstructType() ; }
-// t = ConstructTemplate()
-// { getQuery().setConstructTemplate(t) ; }
-// ( DatasetClause() )*
-// WhereClause()
-// SolutionModifier()
-// #else
<CONSTRUCT>
{ getQuery().setQueryConstructType() ; }
(
- // Full form.
t = ConstructTemplate()
{ getQuery().setConstructTemplate(t) ; }
( DatasetClause() )*
WhereClause()
SolutionModifier()
|
- // Abbreviated CONSTRUCT WHERE {}
( DatasetClause() )*
<WHERE>
- // Should have been "ConstructTemplate()"
<LBRACE>
(TriplesTemplate(acc))?
<RBRACE>
@@ -235,14 +131,12 @@ void ConstructQuery() : { Template t ;
{
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) ;
getQuery().setQueryPattern(elg) ;
}
)
-//#endif
}
void DescribeQuery() : { Node n ; }
{
@@ -266,7 +160,6 @@ void AskQuery() : {}
WhereClause()
SolutionModifier()
}
-// ----
void DatasetClause() : {}
{
<FROM>
@@ -276,7 +169,6 @@ void DefaultGraphClause() : { String iri ; }
{
iri = SourceSelector()
{
- // This checks for duplicates
getQuery().addGraphURI(iri) ;
}
}
@@ -285,7 +177,6 @@ void NamedGraphClause() : { String iri ; }
<NAMED>
iri = SourceSelector()
{
- // This checks for duplicates
getQuery().addNamedGraphURI(iri) ;
}
}
@@ -347,14 +238,14 @@ void OrderCondition() :
{
{ direction = Query.ORDER_DEFAULT ; }
(
- ( // These are for clarity in the HTML
+ (
( <ASC> { direction = Query.ORDER_ASCENDING ; }
| <DESC> { direction = Query.ORDER_DESCENDING ; } )
expr = BrackettedExpression()
)
|
( expr = Constraint()
- | v = Var() //{ expr = asExpr(v) ; }
+ | v = Var()
)
)
{ if ( v == null )
@@ -364,9 +255,6 @@ void OrderCondition() :
}
void LimitOffsetClauses() : { }
{
- // SPARQL does not care about the order here.
- // SQL (where implemented) does (it's LIMIT then OFFSET generally)
- // But that is counter intuitive as it's applied the other way round
(
LimitClause() (OffsetClause())?
|
@@ -392,16 +280,12 @@ void ValuesClause() : { Token t ; }
{ finishValuesClause(t.beginLine, t.beginColumn) ; }
)?
}
-// SPARQL Update + transitional extensions for SPARQL/Update (the W3C submission)
-// Update only entry point
void Update() : { }
{
- // Rewrite for no recursion - grammar is not LL(1)
Prologue()
(
Update1()
(
- // This syntactic lookahead is necessitated by the optional trailing semicolon and prologue
LOOKAHEAD( <SEMICOLON> Prologue() ( <LOAD> | <CLEAR> | <DROP> | <ADD> |
<MOVE> | <COPY> | <CREATE> | <WITH> | <DELETE> | <INSERT> |
<USING> | <INSERT_DATA> | <DELETE_DATA> | <DELETE_WHERE> ) )
@@ -437,7 +321,6 @@ void Update1() : { Update up = null ; }
}
Update Load() : { String url ; Node dest = null ; boolean silent = false ; }
{
- // <LOAD> ( iri() )+
<LOAD> (<SILENT> { silent = true ; })? url = iri()
(<INTO> dest = GraphRef() )?
{ return new UpdateLoad(url, dest, silent) ; }
@@ -472,13 +355,6 @@ Update Copy() : { Target src ; Target dest ; boolean silent = false ; }
<COPY> (<SILENT> { silent=true ; } )? src = GraphOrDefault() <TO> dest = GraphOrDefault()
{ return new UpdateCopy(src, dest, silent) ; }
}
-// #ifdef ARQ
-// void Meta() : { QuadDataAccSink qd = new QuadDataAccSink() ; }
-// {
-// <META>
-// QuadData(qd)
-// }
-// #endif
void InsertData() : { QuadDataAccSink qd = createInsertDataSink() ; Token t ; }
{
t = <INSERT_DATA>
@@ -519,7 +395,6 @@ Update Modify() : { Element el ; String iri = null ;
| InsertClause(up)
)
(UsingClause(up))*
- // WHERE is mandatory here.
<WHERE>
{ startWherePattern() ; }
el = GroupGraphPattern() { up.setElement(el) ; }
@@ -582,7 +457,6 @@ void QuadPattern(QuadAcc acc) : { }
Quads(acc)
<RBRACE>
}
-//Ground data : As QuadPattern but don't allow variables.
void QuadData(QuadDataAccSink acc) : { }
{
<LBRACE>
@@ -608,13 +482,11 @@ void QuadsNotTriples(QuadAccSink acc) : {Node gn ; Node prev = acc.getGraph() ;
{ setAccGraph(acc, prev) ; }
}
void TriplesTemplate(TripleCollector acc) : { }
-{ // same as ConstructTriples
- // Rewrite for no recursion - grammar is not LL(1)
+{
TriplesSameSubject(acc)
(LOOKAHEAD(2) (<DOT>) TriplesSameSubject(acc))*
(<DOT>)?
}
-// ---- General Graph Pattern
Element GroupGraphPattern() : { Element el = null ; Token t ; }
{
t = <LBRACE>
@@ -635,9 +507,6 @@ Element GroupGraphPatternSub() : { Element el = null ; }
{
{ ElementGroup elg = new ElementGroup() ; }
{ startGroup(elg) ; }
- // Ensure two BGP's can't be next to each other
- // Done by seeing if there is a non-BGP and recursing
- // if there is an intermediate
(
{ startTriplesBlock() ; }
el = TriplesBlock(null)
@@ -667,14 +536,9 @@ Element TriplesBlock(ElementPathBlock acc) : { }
( <DOT> (TriplesBlock(acc))? )?
{ return acc ; }
}
-// -----
Element GraphPatternNotTriples() : { Element el = null ; }
{
(
-// el = GroupGraphPattern()
-// |
-// el = UnionGraphPattern()
-// |
el = GroupOrUnionGraphPattern()
|
el = OptionalGraphPattern()
@@ -699,7 +563,6 @@ Element GraphPatternNotTriples() : { Element el = null ; }
)
{ return el ; }
}
-// ---- Definitions of each pattern element
Element OptionalGraphPattern() : { Element el ; }
{ <OPTIONAL> el = GroupGraphPattern()
{ return new ElementOptional(el) ; }
@@ -821,16 +684,6 @@ Element MinusGraphPattern() : { Element el ; }
el = GroupGraphPattern()
{ return new ElementMinus(el) ; }
}
-// 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.
Element GroupOrUnionGraphPattern() :
{ Element el = null ; ElementUnion el2 = null ; }
{
@@ -899,7 +752,6 @@ ExprList ExpressionList() : { Expr expr = null ; ExprList args = new ExprList()
)
{ return args ; }
}
-// -------- Construct patterns
Template ConstructTemplate() : { TripleCollectorBGP acc = new TripleCollectorBGP();
Template t = new Template(acc.getBGP()) ; }
{
@@ -911,20 +763,16 @@ Template ConstructTemplate() : { TripleCollectorBGP acc = new TripleCollectorBGP
return t ; }
}
void ConstructTriples(TripleCollector acc) : { }
-{ // Same as TriplesTemplate, but retain for 1.0 legacy
- // Rewrite for no recursion - grammar is not LL(1)
+{
TriplesSameSubject(acc)
(LOOKAHEAD(2) (<DOT>) TriplesSameSubject(acc))*
(<DOT>)?
}
-// -------- Triple lists with property and object lists
-// -------- Without paths: entry: TriplesSameSubject
void TriplesSameSubject(TripleCollector acc) : { Node s ; }
{
s = VarOrTerm()
PropertyListNotEmpty(s, acc)
|
- // Any of the triple generating syntax elements
{ ElementPathBlock tempAcc = new ElementPathBlock() ; }
s = TriplesNode(tempAcc)
PropertyList(s, tempAcc)
@@ -948,8 +796,6 @@ void PropertyListNotEmpty(Node s, TripleCollector acc) :
}
Node Verb() : { Node p ;}
{
-// Blank nodes as predicates
-// ( p = VarOrBlankNodeOriri() | <KW_A> { p = nRDFtype ; } )
( p = VarOrIri() | <KW_A> { p = nRDFtype ; } )
{ return p ; }
}
@@ -964,14 +810,11 @@ void Object(Node s, Node p, Path path, TripleCollector acc): { Node o ; }
o = GraphNode(tempAcc)
{ insert(tempAcc, mark, s, p, path, o) ; insert(acc, tempAcc) ; }
}
-// -------- BGPs with paths.
-// -------- Entry point: TriplesSameSubjectPath
void TriplesSameSubjectPath(TripleCollector acc) : { Node s ; }
{
s = VarOrTerm()
PropertyListPathNotEmpty(s, acc)
|
- // Any of the triple generating syntax elements
{ ElementPathBlock tempAcc = new ElementPathBlock() ; }
s = TriplesNodePath(tempAcc)
PropertyListPath(s, tempAcc)
@@ -1004,8 +847,6 @@ Path VerbPath() : {Node p ; Path path ; }
}
Node VerbSimple() : { Node p ; }
{
- // "a" now allowed in paths.
- //( p = Var() | <KW_A> { p = nRDFtype ; } )
p = Var()
{ return p ; }
}
@@ -1020,8 +861,6 @@ void ObjectPath(Node s, Node p, Path path, TripleCollector acc): { Node o ; }
o = GraphNodePath(tempAcc)
{ insert(tempAcc, mark, s, p, path, o) ; insert(acc, tempAcc) ; }
}
-// End paths stuff.
-// -------- Paths
Path PathUnit() : { Path p ; }
{
ByteOrderMark()
@@ -1029,7 +868,6 @@ Path PathUnit() : { Path p ; }
<EOF>
{ return p ; }
}
-// Weakest outermost
Path Path() : { Path p ; }
{
p = PathAlternative() { return p ; }
@@ -1048,20 +886,17 @@ Path PathSequence() : { Path p1 , p2 ; }
p1 = PathEltOrInverse()
( <SLASH> p2 = PathEltOrInverse()
{ p1 = PathFactory.pathSeq(p1, p2) ; }
- // :p^:q -- Not in SPARQL 1.1
| <CARAT> p2 = PathElt()
{ p1 = PathFactory.pathSeq(p1, new P_Inverse(p2)) ; }
)*
{ return p1; }
}
-// Path unit element, no inverse
Path PathElt() : { String str ; Node n ; Path p ; }
{
p = PathPrimary()
( p = PathMod(p) )?
{ return p ; }
}
-// Path unit element, including inverse.
Path PathEltOrInverse() : { String str ; Node n ; Path p ; }
{
( p = PathElt()
@@ -1077,25 +912,23 @@ Path PathMod(Path p) : { long i1 ; long i2 ; }
| <STAR> { return PathFactory.pathZeroOrMore1(p) ; }
| <PLUS> { return PathFactory.pathOneOrMore1(p) ; }
| <LBRACE>
- //{*}
( <STAR> <RBRACE> { return PathFactory.pathZeroOrMoreN(p) ; }
- // {+}
| <PLUS> <RBRACE> { return PathFactory.pathOneOrMoreN(p) ; }
- | // {N} {N,M} {N,}
+ |
i1 = Integer()
( <COMMA>
- ( // case {N,}
+ (
<RBRACE>
{ return PathFactory.pathMod(p, i1, PathFactory.UNSET) ; }
- | // case {N,M}
- i2 = Integer() <RBRACE> // case {N,M}
+ |
+ i2 = Integer() <RBRACE>
{ return PathFactory.pathMod(p, i1, i2) ; }
)
|
- <RBRACE> // {N}
+ <RBRACE>
{ return PathFactory.pathFixedLength(p, i1) ; }
)
- | // {,N}
+ |
<COMMA>
i2 = Integer()
<RBRACE>
@@ -1147,7 +980,6 @@ P_Path0 PathOneInPropertySet() : { String str ; Node n ; }
{
( str = iri() { n = createNode(str) ; return new P_Link(n) ; }
| <KW_A> { return new P_Link(nRDFtype) ; }
- // This is the !(^:property) form.
| <CARAT>
( str = iri() { n = createNode(str) ; return new P_ReverseLink(n) ; }
| <KW_A> { return new P_ReverseLink(nRDFtype) ; }
@@ -1159,9 +991,6 @@ long Integer() : {Token t ;}
t = <INTEGER>
{ return integerValue(t.image) ; }
}
-// -------- Triple expansions
-// Anything that can stand in a node slot and which is
-// a number of triples
Node TriplesNode(TripleCollectorMark acc) : { Node n ; }
{
n = Collection(acc) { return n ; }
@@ -1190,7 +1019,6 @@ Node BlankNodePropertyListPath(TripleCollector acc) : { Token t ; }
<RBRACKET>
{ return n ; }
}
-// ------- RDF collections
Node Collection(TripleCollectorMark acc) :
{ Node listHead = nRDFnil ; Node lastCell = null ; int mark ; Node n ; Token t ; }
{
@@ -1210,7 +1038,6 @@ Node Collection(TripleCollectorMark acc) :
lastCell = cell ;
}
) +
- // Not * here - "()" is handled separately.
<RPAREN>
{ if ( lastCell != null )
insert(acc, lastCell, nRDFrest, nRDFnil) ;
@@ -1235,13 +1062,11 @@ Node CollectionPath(TripleCollectorMark acc) :
lastCell = cell ;
}
) +
- // Not * here - "()" is handled separately.
<RPAREN>
{ if ( lastCell != null )
insert(acc, lastCell, nRDFrest, nRDFnil) ;
return listHead ; }
}
-// -------- Nodes in a graph pattern or template
Node GraphNode(TripleCollectorMark acc) : { Node n ; }
{
n = VarOrTerm() { return n ; }
@@ -1259,7 +1084,6 @@ Node VarOrTerm() : {Node n = null ; }
( n = Var() | n = GraphTerm() )
{ return n ; }
}
-// Property (if no bNodes) + DESCRIBE
Node VarOrIri() : {Node n = null ; String iri ; }
{
( n = Var() | iri = iri() { n = createNode(iri) ; } )
@@ -1277,10 +1101,8 @@ Node GraphTerm() : { Node n ; String iri ; }
| n = NumericLiteral() { return n ; }
| n = BooleanLiteral() { return n ; }
| n = BlankNode() { return n ; }
- // <LPAREN> <RPAREN> { return nRDFnil ; }
| <NIL> { return nRDFnil ; }
}
-// -------- Constraint syntax
Expr Expression() : { Expr expr ; }
{
expr = ConditionalOrExpression()
@@ -1378,8 +1200,6 @@ Expr MultiplicativeExpression() : { Expr expr1, expr2 ; }
{ expr1 = new E_Multiply(expr1, expr2) ; }
| <SLASH> expr2 = UnaryExpression()
{ expr1 = new E_Divide(expr1, expr2) ; }
-// | <REM> expr2 = UnaryExpression()
-// { expr1 = new E_Modulus(expr1, expr2) ; }
)*
{ return expr1 ; }
}
@@ -1396,16 +1216,10 @@ Expr PrimaryExpression() : { Expr expr ; Node gn ; }
( expr = BrackettedExpression() { return expr ; }
| expr = BuiltInCall() { return expr ; }
| expr = iriOrFunction() { return expr ; }
-// NOT | gn = VarOrTerm() { return asExpr(gn) ; }
-// Because of iriOrFunction
| gn = RDFLiteral() { return asExpr(gn) ; }
| gn = NumericLiteral() { return asExpr(gn) ; }
| gn = BooleanLiteral() { return asExpr(gn) ; }
| gn = Var() { return asExpr(gn) ; }
-// and not SPARQL 11
-// needs checking.
-// Use this for ?var(args)
-// | expr = VarOrFunction() { return expr ; }
)
}
Expr BrackettedExpression() : { Expr expr ; }
@@ -1479,11 +1293,7 @@ Expr BuiltInCall() : { Expr expr ; Expr expr1 = null ; Expr expr2 = null ;
| <VERSION> <NIL> { return new E_Version(); }
| <COALESCE> a = ExpressionList()
{ return new E_Coalesce(a) ; }
- // Maybe also allow ?func(?a1,?a2,...)
-// | <CALL> a = ExpressionList()
-// { return new E_Call(a) ; }
| <CALL>
- // at least one argument (the function to call).
{ a = new ExprList() ; }
<LPAREN>
expr = Expression() { a.add(expr) ; }
@@ -1510,7 +1320,7 @@ Expr BuiltInCall() : { Expr expr ; Expr expr1 = null ; Expr expr2 = null ;
{ return new E_IsLiteral(expr) ; }
| <IS_NUMERIC> <LPAREN> expr = Expression() <RPAREN>
{ return new E_IsNumeric(expr) ; }
- | // Regular expression matcher
+ |
expr = RegexExpression() { return expr ; }
| expr = ExistsFunc() { return expr ; }
| expr = NotExistsFunc() { return expr ; }
@@ -1570,8 +1380,6 @@ Expr Aggregate() : { Aggregator agg = null ; String sep = null ;
ExprList ordered = new ExprList() ;
Token t ; }
{
- // Count is special because of COUNT(*)
- // GROUP_CONCAT is special because of separator=
( t = <COUNT> <LPAREN>
( <DISTINCT> { distinct = true ; } )?
( <STAR> | expr = Expression() )
@@ -1593,7 +1401,6 @@ Expr Aggregate() : { Aggregator agg = null ; String sep = null ;
<LPAREN>
(t = <DISTINCT> { distinct = true ; })?
expr = Expression() { a.add(expr) ; }
- // JavcaCC 5.0 - rewriting as LL(1) didn't work - code generated was wrong
(LOOKAHEAD(2)
( <SEMICOLON> <SEPARATOR> <EQ> sep=String()
(<SEMICOLON> <ORDER><BY> expr2 = Expression() { ordered.add(expr2) ; })?
@@ -1612,9 +1419,6 @@ Expr Aggregate() : { Aggregator agg = null ; String sep = null ;
{ Expr exprAgg = getQuery().allocAggregate(agg) ;
return exprAgg ; }
}
-// See also FunctionCall.
-// The case of "q:name()" or "q:agg()" or just "q:name"
-// by expanding out FunctionCall()
Expr iriOrFunction() : { String iri ; ExprList a = null ;
ExprList params = null ;
boolean distinct = false ; }
@@ -1629,7 +1433,6 @@ Expr iriOrFunction() : { String iri ; ExprList a = null ;
Node RDFLiteral() : { Token t ; String lex = null ; }
{
lex = String()
- // Optional lang tag and datatype.
{ String lang = null ; String uri = null ; }
(
( t = <LANGTAG> { lang = stripChars(t.image, 1) ; } )
@@ -1703,7 +1506,6 @@ Node BlankNode() : { Token t = null ; }
t = <BLANK_NODE_LABEL>
{ return createBNode(t.image, t.beginLine, t.beginColumn) ; }
|
-// <LBRACKET> <RBRACKET> { return createBNode(t.beginLine, t.beginColumn) ; }
t = <ANON> { return createBNode(t.beginLine, t.beginColumn) ; }
}
String IRIREF() : { Token t ; }
@@ -1711,24 +1513,18 @@ String IRIREF() : { Token t ; }
t = <IRIref>
{ return resolveQuotedIRI(t.image, t.beginLine, t.beginColumn) ; }
}
-// ------------------------------------------
-// Tokens
-// Comments and whitespace
SKIP : { " " | "\t" | "\n" | "\r" | "\f" }
SPECIAL_TOKEN :
{ <SINGLE_LINE_COMMENT: "#" (~["\n","\r"])* ("\n"|"\r"|"\r\n")? > }
TOKEN: {
<#WS: " " | "\t" | "\n" | "\r" | "\f">
|
- // Whitespace or comment.
<#WSC: <WS> | <SINGLE_LINE_COMMENT> >
|
<BOM: "\uFEFF">
}
-// Main tokens */
TOKEN:
{
- // Includes # for relative URIs
<IRIref: "<" (~[ ">","<", "\"", "{", "}", "^", "\\", "|", "`",
"\u0000"-"\u0020"])* ">" >
| <PNAME_NS: (<PN_PREFIX>)? ":" >
@@ -1740,17 +1536,11 @@ TOKEN:
| <#A2Z: ["a"-"z","A"-"Z"]>
| <#A2ZN: ["a"-"z","A"-"Z","0"-"9"]>
}
-// -------------------------------------------------
-// Keyworks : includes operators that are words and should be
-// before general things like IDENTIFIER which swallow almost
-// anything
TOKEN : { <KW_A: "a" > }
TOKEN [IGNORE_CASE] :
{
-// Prologue
< BASE: "base" >
| < PREFIX: "prefix" >
-// Result forms
| < SELECT: "select" >
| < DISTINCT: "distinct" >
| < REDUCED: "reduced" >
@@ -1765,10 +1555,8 @@ TOKEN [IGNORE_CASE] :
| < UNDEF: "undef" >
| < ASC: "asc" >
| < DESC: "desc" >
-// Dataset
| < NAMED: "named" >
| < FROM: "from" >
-// Graph pattern operators
| < WHERE: "where" >
| < AND: "and" >
| < GRAPH: "graph" >
@@ -1780,7 +1568,6 @@ TOKEN [IGNORE_CASE] :
| < LET: "let" >
| < EXISTS: "exists" >
| < NOT: "not" >
-//| < UNSAID: "unsaid" >
| < AS: "as" >
| < GROUP: "group" >
| < HAVING: "having" >
@@ -1795,7 +1582,6 @@ TOKEN [IGNORE_CASE] :
| < SAMPLE: "sample" >
| < GROUP_CONCAT: "group_concat" >
| < FILTER: "filter" >
-// Expression operators
| < BOUND: "bound" >
| < COALESCE: "coalesce" >
| < IN: "in" >
@@ -1858,7 +1644,6 @@ TOKEN [IGNORE_CASE] :
| < TRUE: "true" >
| < FALSE: "false" >
}
-// SPARQL/Update parts.
TOKEN [IGNORE_CASE] :
{
< DATA: "data" >
@@ -1879,22 +1664,16 @@ TOKEN [IGNORE_CASE] :
| < INTO: "into" >
| < TO: "to" >
| < DFT: "default" >
-//| < NAMED: "named" >
| < ALL: "all" >
| < WITH: "with" >
| < USING: "using" >
-//| < BEGIN: "begin" >
-//| < COMMIT: "commit" >
-//| < ABORT: "abort" >
}
-// -------------------------------------------------
TOKEN :
{
< #DIGITS: (["0"-"9"])+>
| < INTEGER: <DIGITS> >
-//| < DECIMAL: ( <DIGITS> "." (<DIGITS>)* | "." <DIGITS> ) >
| < DECIMAL: (<DIGITS>)? "." <DIGITS> >
-| < DOUBLE: // Required exponent.
+| < DOUBLE:
(
(["0"-"9"])+ "." (["0"-"9"])* <EXPONENT>
| "." (["0"-"9"])+ (<EXPONENT>)
@@ -1912,10 +1691,8 @@ TOKEN :
| < #QUOTE_3S: "'''">
| <ECHAR: "\\" ( "t"|"b"|"n"|"r"|"f"|"\\"|"\""|"'") >
| < STRING_LITERAL1:
- // Single quoted string
"'" ( (~["'","\\","\n","\r"]) | <ECHAR> )* "'" >
| < STRING_LITERAL2:
- // Double quoted string
"\"" ( (~["\"","\\","\n","\r"]) | <ECHAR> )* "\"" >
| < STRING_LITERAL_LONG1:
<QUOTE_3S>
@@ -1930,10 +1707,6 @@ TOKEN :
{
< LPAREN: "(" >
| < RPAREN: ")" >
-// All the stuff for NUL is needed just to make a
-// single list "() ." as a triple pattern illegal.
-// It leads to a lot of extra work.
-// Similarly [].
| <NIL: <LPAREN> (<WSC>)* <RPAREN> >
| < LBRACE: "{" >
| < RBRACE: "}" >
@@ -1947,8 +1720,8 @@ TOKEN :
| < NE: "!=" >
| < GT: ">" >
| < LT: "<" >
-| < LE: "<=" > // Maybe: | "=>" >
-| < GE: ">=" > // Maybe: | "=<" >
+| < LE: "<=" >
+| < GE: ">=" >
| < BANG: "!" >
| < TILDE: "~" >
| < COLON: ":" >
@@ -1958,22 +1731,17 @@ TOKEN :
| < MINUS: "-" >
| < STAR: "*" >
| < SLASH: "/" >
-//| < AMP: "&" >
-//| < REM: "%" >
| < DATATYPE: "^^">
| < AT: "@">
| < ASSIGN: ":=">
-// Path related
| < VBAR: "|" >
| < CARAT: "^" >
| < FPATH: "->" >
| < RPATH: "<-" >
| < QMARK: "?" >
}
-// See XML chars.txt for notes
TOKEN:
{
- // XML 1.1 NCNameStartChar without "_"
<#PN_CHARS_BASE:
["A"-"Z"] | ["a"-"z"] |
["\u00C0"-"\u00D6"] | ["\u00D8"-"\u00F6"] | ["\u00F8"-"\u02FF"] |
@@ -1981,18 +1749,14 @@ TOKEN:
["\u200C"-"\u200D"] | ["\u2070"-"\u218F"] | ["\u2C00"-"\u2FEF"] |
["\u3001"-"\uD7FF"] | ["\uF900"-"\uFFFD"]
>
- // [#x10000-#xEFFFF]
|
- // With underscore
<#PN_CHARS_U: <PN_CHARS_BASE> | "_" >
|
<#PN_CHARS: (<PN_CHARS_U> | "-" | ["0"-"9"] | "\u00B7" |
["\u0300"-"\u036F"] | ["\u203F"-"\u2040"] ) >
|
- // No leading "_", no trailing ".", can have dot inside prefix name.
<#PN_PREFIX: <PN_CHARS_BASE> ((<PN_CHARS>|".")* <PN_CHARS>)? >
|
- // Local part.
<#PN_LOCAL: (<PN_CHARS_U> | ":" | ["0"-"9"] | <PLX> )
( (<PN_CHARS> | "." |":" | <PLX> )*
(<PN_CHARS> | ":" | <PLX>) )? >
@@ -2001,7 +1765,6 @@ TOKEN:
( <PN_CHARS_U> | ["0"-"9"] | "\u00B7" |
["\u0300"-"\u036F"] | ["\u203F"-"\u2040"] )* >
|
- // Align with QueryParseBase unescapePName.
< #PN_LOCAL_ESC: "\\"
( "_" |
"~" | "." | "-" | "!" | "$" | "&" | "'" |
@@ -2014,17 +1777,7 @@ TOKEN:
|
< #PERCENT: "%" <HEX> <HEX> >
}
-// Catch-all tokens. Must be last.
-// Any non-whitespace. Causes a parser exception, rather than a
-// token manager error (which hides the line numbers).
TOKEN:
{
<#UNKNOWN: (~[" ","\t","\n","\r","\f" ])+ >
}
-/*
-# Local Variables:
-# tab-width: 4
-# indent-tabs-mode: nil
-# comment-default-style: "//"
-# End:
-*/
http://git-wip-us.apache.org/repos/asf/jena/blob/5b8a7b85/jena-arq/Grammar/grammar
----------------------------------------------------------------------
diff --git a/jena-arq/Grammar/grammar b/jena-arq/Grammar/grammar
index fbb3b89..c69909b 100755
--- a/jena-arq/Grammar/grammar
+++ b/jena-arq/Grammar/grammar
@@ -120,7 +120,7 @@ do
# SPARQL 1.0 - use a static copy.
# The parser that is exactly the working group grammar.
-## #### cat "$GRAMMAR" | cpp -P -C -DSPARQL -DSPARQL_10 > sparql_10.jj
+## #### cat "$GRAMMAR" | cpp -P -DSPARQL -DSPARQL_10 > sparql_10.jj
## grammar sparql_10.jj sparql_10 SPARQLParser10
## ;;
echo "SPARQL 1.0 - not rebuilt"
@@ -128,12 +128,12 @@ do
sparql11|sparql_11.jj)
# The parser that is exactly the working group grammar.
- cat "$GRAMMAR" | cpp -P -C -DSPARQL -DSPARQL_11 > sparql_11.jj
+ cat "$GRAMMAR" | cpp -P -DSPARQL -DSPARQL_11 > sparql_11.jj
grammar sparql_11.jj sparql_11 SPARQLParser11
;;
arq|arq.jj)
- cat "$GRAMMAR" | cpp -P -C -DARQ > arq.jj
+ cat "$GRAMMAR" | cpp -P -DARQ - > arq.jj
grammar arq.jj arq ARQParser
;;
http://git-wip-us.apache.org/repos/asf/jena/blob/5b8a7b85/jena-arq/Grammar/master.jj
----------------------------------------------------------------------
diff --git a/jena-arq/Grammar/master.jj b/jena-arq/Grammar/master.jj
index 6b958e1..2a21da4 100644
--- a/jena-arq/Grammar/master.jj
+++ b/jena-arq/Grammar/master.jj
@@ -1,20 +1,18 @@
-/**
- * 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.
- */
+// 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.
// ARQ/SPARQL 1.1 Grammar - native syntax for the query engine
#if 0
@@ -712,7 +710,7 @@ void TriplesTemplate(TripleCollector acc) : { }
#endif
}
-#endif // UPDATE
+#endif
// ---- General Graph Pattern
http://git-wip-us.apache.org/repos/asf/jena/blob/5b8a7b85/jena-arq/Grammar/sparql_11.jj
----------------------------------------------------------------------
diff --git a/jena-arq/Grammar/sparql_11.jj b/jena-arq/Grammar/sparql_11.jj
index 2bdd531..4813e00 100644
--- a/jena-arq/Grammar/sparql_11.jj
+++ b/jena-arq/Grammar/sparql_11.jj
@@ -1,85 +1,10 @@
-/* Copyright (C) 1991-2014 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-/* This header is separate from features.h so that the compiler can
- include it implicitly at the start of every compilation. It must
- not itself include <features.h> or any other header that includes
- <features.h> because the implicit include comes before any feature
- test macros that may be defined in a source file before it first
- explicitly includes a system header. GCC knows the name of this
- header in order to preinclude it. */
-/* glibc's intent is to support the IEC 559 math functionality, real
- and complex. If the GCC (4.9 and later) predefined macros
- specifying compiler intent are available, use them to determine
- whether the overall intent is to support these features; otherwise,
- presume an older compiler has intent to support these features and
- define these macros by default. */
-/* wchar_t uses ISO/IEC 10646 (2nd ed., published 2011-03-15) /
- Unicode 6.0. */
-/* We do not support C11 <threads.h>. */
-/**
- * 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.
- */
-// ARQ/SPARQL 1.1 Grammar - native syntax for the query engine
options
{
- // \ u processed in the input stream
- // SPARQL 1.0
JAVA_UNICODE_ESCAPE = true ;
UNICODE_INPUT = false ;
-// // \ u processed after parsing.
-// // strings, prefix names, IRIs
-// JAVA_UNICODE_ESCAPE = false ;
-// UNICODE_INPUT = true ;
STATIC = false ;
-// DEBUG_PARSER = true ;
-// DEBUG_TOKEN_MANAGER = true ;
}
PARSER_BEGIN(SPARQLParser11)
-/**
- * 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.* ;
@@ -95,13 +20,6 @@ public class SPARQLParser11 extends SPARQLParser11Base
boolean allowAggregatesInExpressions = false ;
}
PARSER_END(SPARQLParser11)
-// // Common top for single entry point.
-// void Top(): {}
-// {
-// ( Query() | Update() )
-// <EOF>
-// }
-// Query only entry point
void QueryUnit(): { }
{
ByteOrderMark()
@@ -113,9 +31,6 @@ void Query() : { }
{
Prologue()
( SelectQuery() | ConstructQuery() | DescribeQuery() | AskQuery()
-// #ifdef ARQ
-// | JsonTemplateQuery()
-// #endif
)
ValuesClause()
}
@@ -146,7 +61,6 @@ void PrefixDecl() : { Token t ; String iri ; }
{ String s = fixupPrefix(t.image, t.beginLine, t.beginColumn) ;
getPrologue().setPrefix(s, iri) ; }
}
-// ---- Query type clauses
void SelectQuery() : { }
{
SelectClause()
@@ -173,7 +87,6 @@ void SelectClause() : { Var v ; Expr expr ; Node n ; }
(
v = Var() { getQuery().addResultVar(v) ; }
|
- // Expressions with ()
(
{ v = null ; }
<LPAREN>
@@ -192,29 +105,17 @@ void SelectClause() : { Var v ; Expr expr ; Node n ; }
void ConstructQuery() : { Template t ;
TripleCollectorBGP acc = new TripleCollectorBGP() ; }
{
-// #ifndef ARQ
-// <CONSTRUCT>
-// { getQuery().setQueryConstructType() ; }
-// t = ConstructTemplate()
-// { getQuery().setConstructTemplate(t) ; }
-// ( DatasetClause() )*
-// WhereClause()
-// SolutionModifier()
-// #else
<CONSTRUCT>
{ getQuery().setQueryConstructType() ; }
(
- // Full form.
t = ConstructTemplate()
{ getQuery().setConstructTemplate(t) ; }
( DatasetClause() )*
WhereClause()
SolutionModifier()
|
- // Abbreviated CONSTRUCT WHERE {}
( DatasetClause() )*
<WHERE>
- // Should have been "ConstructTemplate()"
<LBRACE>
(TriplesTemplate(acc))?
<RBRACE>
@@ -222,14 +123,12 @@ void ConstructQuery() : { Template t ;
{
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) ;
getQuery().setQueryPattern(elg) ;
}
)
-//#endif
}
void DescribeQuery() : { Node n ; }
{
@@ -253,7 +152,6 @@ void AskQuery() : {}
WhereClause()
SolutionModifier()
}
-// ----
void DatasetClause() : {}
{
<FROM>
@@ -263,7 +161,6 @@ void DefaultGraphClause() : { String iri ; }
{
iri = SourceSelector()
{
- // This checks for duplicates
getQuery().addGraphURI(iri) ;
}
}
@@ -272,7 +169,6 @@ void NamedGraphClause() : { String iri ; }
<NAMED>
iri = SourceSelector()
{
- // This checks for duplicates
getQuery().addNamedGraphURI(iri) ;
}
}
@@ -334,14 +230,14 @@ void OrderCondition() :
{
{ direction = Query.ORDER_DEFAULT ; }
(
- ( // These are for clarity in the HTML
+ (
( <ASC> { direction = Query.ORDER_ASCENDING ; }
| <DESC> { direction = Query.ORDER_DESCENDING ; } )
expr = BrackettedExpression()
)
|
( expr = Constraint()
- | v = Var() //{ expr = asExpr(v) ; }
+ | v = Var()
)
)
{ if ( v == null )
@@ -351,9 +247,6 @@ void OrderCondition() :
}
void LimitOffsetClauses() : { }
{
- // SPARQL does not care about the order here.
- // SQL (where implemented) does (it's LIMIT then OFFSET generally)
- // But that is counter intuitive as it's applied the other way round
(
LimitClause() (OffsetClause())?
|
@@ -379,12 +272,8 @@ void ValuesClause() : { Token t ; }
{ finishValuesClause(t.beginLine, t.beginColumn) ; }
)?
}
-// SPARQL Update + transitional extensions for SPARQL/Update (the W3C submission)
-// Update only entry point
-// Strict SPARQL 1.1 : mandatory separator, optional terminator.
void Update() : { }
{
- // SPARQL - recursion - does not scale for large number of updates in a single request
Prologue()
(Update1() ( <SEMICOLON> Update() )? )?
}
@@ -410,7 +299,6 @@ void Update1() : { Update up = null ; }
}
Update Load() : { String url ; Node dest = null ; boolean silent = false ; }
{
- // <LOAD> ( iri() )+
<LOAD> (<SILENT> { silent = true ; })? url = iri()
(<INTO> dest = GraphRef() )?
{ return new UpdateLoad(url, dest, silent) ; }
@@ -445,13 +333,6 @@ Update Copy() : { Target src ; Target dest ; boolean silent = false ; }
<COPY> (<SILENT> { silent=true ; } )? src = GraphOrDefault() <TO> dest = GraphOrDefault()
{ return new UpdateCopy(src, dest, silent) ; }
}
-// #ifdef ARQ
-// void Meta() : { QuadDataAccSink qd = new QuadDataAccSink() ; }
-// {
-// <META>
-// QuadData(qd)
-// }
-// #endif
void InsertData() : { QuadDataAccSink qd = createInsertDataSink() ; Token t ; }
{
t = <INSERT_DATA>
@@ -492,7 +373,6 @@ Update Modify() : { Element el ; String iri = null ;
| InsertClause(up)
)
(UsingClause(up))*
- // WHERE is mandatory here.
<WHERE>
{ startWherePattern() ; }
el = GroupGraphPattern() { up.setElement(el) ; }
@@ -555,7 +435,6 @@ void QuadPattern(QuadAcc acc) : { }
Quads(acc)
<RBRACE>
}
-//Ground data : As QuadPattern but don't allow variables.
void QuadData(QuadDataAccSink acc) : { }
{
<LBRACE>
@@ -581,12 +460,10 @@ void QuadsNotTriples(QuadAccSink acc) : {Node gn ; Node prev = acc.getGraph() ;
{ setAccGraph(acc, prev) ; }
}
void TriplesTemplate(TripleCollector acc) : { }
-{ // same as ConstructTriples
- // Version for the spec.
+{
TriplesSameSubject(acc)
(<DOT> (TriplesTemplate(acc))?)?
}
-// ---- General Graph Pattern
Element GroupGraphPattern() : { Element el = null ; Token t ; }
{
t = <LBRACE>
@@ -607,9 +484,6 @@ Element GroupGraphPatternSub() : { Element el = null ; }
{
{ ElementGroup elg = new ElementGroup() ; }
{ startGroup(elg) ; }
- // Ensure two BGP's can't be next to each other
- // Done by seeing if there is a non-BGP and recursing
- // if there is an intermediate
(
{ startTriplesBlock() ; }
el = TriplesBlock(null)
@@ -639,14 +513,9 @@ Element TriplesBlock(ElementPathBlock acc) : { }
( <DOT> (TriplesBlock(acc))? )?
{ return acc ; }
}
-// -----
Element GraphPatternNotTriples() : { Element el = null ; }
{
(
-// el = GroupGraphPattern()
-// |
-// el = UnionGraphPattern()
-// |
el = GroupOrUnionGraphPattern()
|
el = OptionalGraphPattern()
@@ -665,7 +534,6 @@ Element GraphPatternNotTriples() : { Element el = null ; }
)
{ return el ; }
}
-// ---- Definitions of each pattern element
Element OptionalGraphPattern() : { Element el ; }
{ <OPTIONAL> el = GroupGraphPattern()
{ return new ElementOptional(el) ; }
@@ -765,16 +633,6 @@ Element MinusGraphPattern() : { Element el ; }
el = GroupGraphPattern()
{ return new ElementMinus(el) ; }
}
-// 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.
Element GroupOrUnionGraphPattern() :
{ Element el = null ; ElementUnion el2 = null ; }
{
@@ -843,7 +701,6 @@ ExprList ExpressionList() : { Expr expr = null ; ExprList args = new ExprList()
)
{ return args ; }
}
-// -------- Construct patterns
Template ConstructTemplate() : { TripleCollectorBGP acc = new TripleCollectorBGP();
Template t = new Template(acc.getBGP()) ; }
{
@@ -855,19 +712,15 @@ Template ConstructTemplate() : { TripleCollectorBGP acc = new TripleCollectorBGP
return t ; }
}
void ConstructTriples(TripleCollector acc) : { }
-{ // Same as TriplesTemplate, but retain for 1.0 legacy
-// SPARQL - recursion - does not scale for SPARQL/Update
+{
TriplesSameSubject(acc)
(<DOT> (ConstructTriples(acc))? )?
}
-// -------- Triple lists with property and object lists
-// -------- Without paths: entry: TriplesSameSubject
void TriplesSameSubject(TripleCollector acc) : { Node s ; }
{
s = VarOrTerm()
PropertyListNotEmpty(s, acc)
|
- // Any of the triple generating syntax elements
{ ElementPathBlock tempAcc = new ElementPathBlock() ; }
s = TriplesNode(tempAcc)
PropertyList(s, tempAcc)
@@ -891,8 +744,6 @@ void PropertyListNotEmpty(Node s, TripleCollector acc) :
}
Node Verb() : { Node p ;}
{
-// Blank nodes as predicates
-// ( p = VarOrBlankNodeOriri() | <KW_A> { p = nRDFtype ; } )
( p = VarOrIri() | <KW_A> { p = nRDFtype ; } )
{ return p ; }
}
@@ -907,14 +758,11 @@ void Object(Node s, Node p, Path path, TripleCollector acc): { Node o ; }
o = GraphNode(tempAcc)
{ insert(tempAcc, mark, s, p, path, o) ; insert(acc, tempAcc) ; }
}
-// -------- BGPs with paths.
-// -------- Entry point: TriplesSameSubjectPath
void TriplesSameSubjectPath(TripleCollector acc) : { Node s ; }
{
s = VarOrTerm()
PropertyListPathNotEmpty(s, acc)
|
- // Any of the triple generating syntax elements
{ ElementPathBlock tempAcc = new ElementPathBlock() ; }
s = TriplesNodePath(tempAcc)
PropertyListPath(s, tempAcc)
@@ -947,8 +795,6 @@ Path VerbPath() : {Node p ; Path path ; }
}
Node VerbSimple() : { Node p ; }
{
- // "a" now allowed in paths.
- //( p = Var() | <KW_A> { p = nRDFtype ; } )
p = Var()
{ return p ; }
}
@@ -963,9 +809,6 @@ void ObjectPath(Node s, Node p, Path path, TripleCollector acc): { Node o ; }
o = GraphNodePath(tempAcc)
{ insert(tempAcc, mark, s, p, path, o) ; insert(acc, tempAcc) ; }
}
-// End paths stuff.
-// -------- Paths
-// Weakest outermost
Path Path() : { Path p ; }
{
p = PathAlternative() { return p ; }
@@ -987,14 +830,12 @@ Path PathSequence() : { Path p1 , p2 ; }
)*
{ return p1; }
}
-// Path unit element, no inverse
Path PathElt() : { String str ; Node n ; Path p ; }
{
p = PathPrimary()
( p = PathMod(p) )?
{ return p ; }
}
-// Path unit element, including inverse.
Path PathEltOrInverse() : { String str ; Node n ; Path p ; }
{
( p = PathElt()
@@ -1040,7 +881,6 @@ P_Path0 PathOneInPropertySet() : { String str ; Node n ; }
{
( str = iri() { n = createNode(str) ; return new P_Link(n) ; }
| <KW_A> { return new P_Link(nRDFtype) ; }
- // This is the !(^:property) form.
| <CARAT>
( str = iri() { n = createNode(str) ; return new P_ReverseLink(n) ; }
| <KW_A> { return new P_ReverseLink(nRDFtype) ; }
@@ -1052,9 +892,6 @@ long Integer() : {Token t ;}
t = <INTEGER>
{ return integerValue(t.image) ; }
}
-// -------- Triple expansions
-// Anything that can stand in a node slot and which is
-// a number of triples
Node TriplesNode(TripleCollectorMark acc) : { Node n ; }
{
n = Collection(acc) { return n ; }
@@ -1083,7 +920,6 @@ Node BlankNodePropertyListPath(TripleCollector acc) : { Token t ; }
<RBRACKET>
{ return n ; }
}
-// ------- RDF collections
Node Collection(TripleCollectorMark acc) :
{ Node listHead = nRDFnil ; Node lastCell = null ; int mark ; Node n ; Token t ; }
{
@@ -1103,7 +939,6 @@ Node Collection(TripleCollectorMark acc) :
lastCell = cell ;
}
) +
- // Not * here - "()" is handled separately.
<RPAREN>
{ if ( lastCell != null )
insert(acc, lastCell, nRDFrest, nRDFnil) ;
@@ -1128,13 +963,11 @@ Node CollectionPath(TripleCollectorMark acc) :
lastCell = cell ;
}
) +
- // Not * here - "()" is handled separately.
<RPAREN>
{ if ( lastCell != null )
insert(acc, lastCell, nRDFrest, nRDFnil) ;
return listHead ; }
}
-// -------- Nodes in a graph pattern or template
Node GraphNode(TripleCollectorMark acc) : { Node n ; }
{
n = VarOrTerm() { return n ; }
@@ -1152,7 +985,6 @@ Node VarOrTerm() : {Node n = null ; }
( n = Var() | n = GraphTerm() )
{ return n ; }
}
-// Property (if no bNodes) + DESCRIBE
Node VarOrIri() : {Node n = null ; String iri ; }
{
( n = Var() | iri = iri() { n = createNode(iri) ; } )
@@ -1170,10 +1002,8 @@ Node GraphTerm() : { Node n ; String iri ; }
| n = NumericLiteral() { return n ; }
| n = BooleanLiteral() { return n ; }
| n = BlankNode() { return n ; }
- // <LPAREN> <RPAREN> { return nRDFnil ; }
| <NIL> { return nRDFnil ; }
}
-// -------- Constraint syntax
Expr Expression() : { Expr expr ; }
{
expr = ConditionalOrExpression()
@@ -1271,8 +1101,6 @@ Expr MultiplicativeExpression() : { Expr expr1, expr2 ; }
{ expr1 = new E_Multiply(expr1, expr2) ; }
| <SLASH> expr2 = UnaryExpression()
{ expr1 = new E_Divide(expr1, expr2) ; }
-// | <REM> expr2 = UnaryExpression()
-// { expr1 = new E_Modulus(expr1, expr2) ; }
)*
{ return expr1 ; }
}
@@ -1289,8 +1117,6 @@ Expr PrimaryExpression() : { Expr expr ; Node gn ; }
( expr = BrackettedExpression() { return expr ; }
| expr = BuiltInCall() { return expr ; }
| expr = iriOrFunction() { return expr ; }
-// NOT | gn = VarOrTerm() { return asExpr(gn) ; }
-// Because of iriOrFunction
| gn = RDFLiteral() { return asExpr(gn) ; }
| gn = NumericLiteral() { return asExpr(gn) ; }
| gn = BooleanLiteral() { return asExpr(gn) ; }
@@ -1387,7 +1213,7 @@ Expr BuiltInCall() : { Expr expr ; Expr expr1 = null ; Expr expr2 = null ;
{ return new E_IsLiteral(expr) ; }
| <IS_NUMERIC> <LPAREN> expr = Expression() <RPAREN>
{ return new E_IsNumeric(expr) ; }
- | // Regular expression matcher
+ |
expr = RegexExpression() { return expr ; }
| expr = ExistsFunc() { return expr ; }
| expr = NotExistsFunc() { return expr ; }
@@ -1447,8 +1273,6 @@ Expr Aggregate() : { Aggregator agg = null ; String sep = null ;
ExprList ordered = new ExprList() ;
Token t ; }
{
- // Count is special because of COUNT(*)
- // GROUP_CONCAT is special because of separator=
( t = <COUNT> <LPAREN>
( <DISTINCT> { distinct = true ; } )?
( <STAR> | expr = Expression() )
@@ -1470,7 +1294,6 @@ Expr Aggregate() : { Aggregator agg = null ; String sep = null ;
<LPAREN>
(t = <DISTINCT> { distinct = true ; })?
expr = Expression() { a.add(expr) ; }
- // Single arg version
(<SEMICOLON> <SEPARATOR> <EQ> sep=String())?
<RPAREN>
{ agg = AggregatorFactory.createGroupConcat(distinct, expr, sep, ordered) ; }
@@ -1483,9 +1306,6 @@ Expr Aggregate() : { Aggregator agg = null ; String sep = null ;
{ Expr exprAgg = getQuery().allocAggregate(agg) ;
return exprAgg ; }
}
-// See also FunctionCall.
-// The case of "q:name()" or "q:agg()" or just "q:name"
-// by expanding out FunctionCall()
Expr iriOrFunction() : { String iri ; ExprList a = null ;
ExprList params = null ;
boolean distinct = false ; }
@@ -1500,7 +1320,6 @@ Expr iriOrFunction() : { String iri ; ExprList a = null ;
Node RDFLiteral() : { Token t ; String lex = null ; }
{
lex = String()
- // Optional lang tag and datatype.
{ String lang = null ; String uri = null ; }
(
( t = <LANGTAG> { lang = stripChars(t.image, 1) ; } )
@@ -1574,7 +1393,6 @@ Node BlankNode() : { Token t = null ; }
t = <BLANK_NODE_LABEL>
{ return createBNode(t.image, t.beginLine, t.beginColumn) ; }
|
-// <LBRACKET> <RBRACKET> { return createBNode(t.beginLine, t.beginColumn) ; }
t = <ANON> { return createBNode(t.beginLine, t.beginColumn) ; }
}
String IRIREF() : { Token t ; }
@@ -1582,24 +1400,18 @@ String IRIREF() : { Token t ; }
t = <IRIref>
{ return resolveQuotedIRI(t.image, t.beginLine, t.beginColumn) ; }
}
-// ------------------------------------------
-// Tokens
-// Comments and whitespace
SKIP : { " " | "\t" | "\n" | "\r" | "\f" }
SPECIAL_TOKEN :
{ <SINGLE_LINE_COMMENT: "#" (~["\n","\r"])* ("\n"|"\r"|"\r\n")? > }
TOKEN: {
<#WS: " " | "\t" | "\n" | "\r" | "\f">
|
- // Whitespace or comment.
<#WSC: <WS> | <SINGLE_LINE_COMMENT> >
|
<BOM: "\uFEFF">
}
-// Main tokens */
TOKEN:
{
- // Includes # for relative URIs
<IRIref: "<" (~[ ">","<", "\"", "{", "}", "^", "\\", "|", "`",
"\u0000"-"\u0020"])* ">" >
| <PNAME_NS: (<PN_PREFIX>)? ":" >
@@ -1611,17 +1423,11 @@ TOKEN:
| <#A2Z: ["a"-"z","A"-"Z"]>
| <#A2ZN: ["a"-"z","A"-"Z","0"-"9"]>
}
-// -------------------------------------------------
-// Keyworks : includes operators that are words and should be
-// before general things like IDENTIFIER which swallow almost
-// anything
TOKEN : { <KW_A: "a" > }
TOKEN [IGNORE_CASE] :
{
-// Prologue
< BASE: "base" >
| < PREFIX: "prefix" >
-// Result forms
| < SELECT: "select" >
| < DISTINCT: "distinct" >
| < REDUCED: "reduced" >
@@ -1636,10 +1442,8 @@ TOKEN [IGNORE_CASE] :
| < UNDEF: "undef" >
| < ASC: "asc" >
| < DESC: "desc" >
-// Dataset
| < NAMED: "named" >
| < FROM: "from" >
-// Graph pattern operators
| < WHERE: "where" >
| < AND: "and" >
| < GRAPH: "graph" >
@@ -1650,7 +1454,6 @@ TOKEN [IGNORE_CASE] :
| < SERVICE: "service" >
| < EXISTS: "exists" >
| < NOT: "not" >
-//| < UNSAID: "unsaid" >
| < AS: "as" >
| < GROUP: "group" >
| < HAVING: "having" >
@@ -1665,7 +1468,6 @@ TOKEN [IGNORE_CASE] :
| < SAMPLE: "sample" >
| < GROUP_CONCAT: "group_concat" >
| < FILTER: "filter" >
-// Expression operators
| < BOUND: "bound" >
| < COALESCE: "coalesce" >
| < IN: "in" >
@@ -1723,7 +1525,6 @@ TOKEN [IGNORE_CASE] :
| < TRUE: "true" >
| < FALSE: "false" >
}
-// SPARQL/Update parts.
TOKEN [IGNORE_CASE] :
{
< DATA: "data" >
@@ -1744,22 +1545,16 @@ TOKEN [IGNORE_CASE] :
| < INTO: "into" >
| < TO: "to" >
| < DFT: "default" >
-//| < NAMED: "named" >
| < ALL: "all" >
| < WITH: "with" >
| < USING: "using" >
-//| < BEGIN: "begin" >
-//| < COMMIT: "commit" >
-//| < ABORT: "abort" >
}
-// -------------------------------------------------
TOKEN :
{
< #DIGITS: (["0"-"9"])+>
| < INTEGER: <DIGITS> >
-//| < DECIMAL: ( <DIGITS> "." (<DIGITS>)* | "." <DIGITS> ) >
| < DECIMAL: (<DIGITS>)? "." <DIGITS> >
-| < DOUBLE: // Required exponent.
+| < DOUBLE:
(
(["0"-"9"])+ "." (["0"-"9"])* <EXPONENT>
| "." (["0"-"9"])+ (<EXPONENT>)
@@ -1777,10 +1572,8 @@ TOKEN :
| < #QUOTE_3S: "'''">
| <ECHAR: "\\" ( "t"|"b"|"n"|"r"|"f"|"\\"|"\""|"'") >
| < STRING_LITERAL1:
- // Single quoted string
"'" ( (~["'","\\","\n","\r"]) | <ECHAR> )* "'" >
| < STRING_LITERAL2:
- // Double quoted string
"\"" ( (~["\"","\\","\n","\r"]) | <ECHAR> )* "\"" >
| < STRING_LITERAL_LONG1:
<QUOTE_3S>
@@ -1795,10 +1588,6 @@ TOKEN :
{
< LPAREN: "(" >
| < RPAREN: ")" >
-// All the stuff for NUL is needed just to make a
-// single list "() ." as a triple pattern illegal.
-// It leads to a lot of extra work.
-// Similarly [].
| <NIL: <LPAREN> (<WSC>)* <RPAREN> >
| < LBRACE: "{" >
| < RBRACE: "}" >
@@ -1812,8 +1601,8 @@ TOKEN :
| < NE: "!=" >
| < GT: ">" >
| < LT: "<" >
-| < LE: "<=" > // Maybe: | "=>" >
-| < GE: ">=" > // Maybe: | "=<" >
+| < LE: "<=" >
+| < GE: ">=" >
| < BANG: "!" >
| < TILDE: "~" >
| < COLON: ":" >
@@ -1823,21 +1612,16 @@ TOKEN :
| < MINUS: "-" >
| < STAR: "*" >
| < SLASH: "/" >
-//| < AMP: "&" >
-//| < REM: "%" >
| < DATATYPE: "^^">
| < AT: "@">
-// Path related
| < VBAR: "|" >
| < CARAT: "^" >
| < FPATH: "->" >
| < RPATH: "<-" >
| < QMARK: "?" >
}
-// See XML chars.txt for notes
TOKEN:
{
- // XML 1.1 NCNameStartChar without "_"
<#PN_CHARS_BASE:
["A"-"Z"] | ["a"-"z"] |
["\u00C0"-"\u00D6"] | ["\u00D8"-"\u00F6"] | ["\u00F8"-"\u02FF"] |
@@ -1845,18 +1629,14 @@ TOKEN:
["\u200C"-"\u200D"] | ["\u2070"-"\u218F"] | ["\u2C00"-"\u2FEF"] |
["\u3001"-"\uD7FF"] | ["\uF900"-"\uFFFD"]
>
- // [#x10000-#xEFFFF]
|
- // With underscore
<#PN_CHARS_U: <PN_CHARS_BASE> | "_" >
|
<#PN_CHARS: (<PN_CHARS_U> | "-" | ["0"-"9"] | "\u00B7" |
["\u0300"-"\u036F"] | ["\u203F"-"\u2040"] ) >
|
- // No leading "_", no trailing ".", can have dot inside prefix name.
<#PN_PREFIX: <PN_CHARS_BASE> ((<PN_CHARS>|".")* <PN_CHARS>)? >
|
- // Local part.
<#PN_LOCAL: (<PN_CHARS_U> | ":" | ["0"-"9"] | <PLX> )
( (<PN_CHARS> | "." |":" | <PLX> )*
(<PN_CHARS> | ":" | <PLX>) )? >
@@ -1865,7 +1645,6 @@ TOKEN:
( <PN_CHARS_U> | ["0"-"9"] | "\u00B7" |
["\u0300"-"\u036F"] | ["\u203F"-"\u2040"] )* >
|
- // Align with QueryParseBase unescapePName.
< #PN_LOCAL_ESC: "\\"
( "_" |
"~" | "." | "-" | "!" | "$" | "&" | "'" |
@@ -1878,17 +1657,7 @@ TOKEN:
|
< #PERCENT: "%" <HEX> <HEX> >
}
-// Catch-all tokens. Must be last.
-// Any non-whitespace. Causes a parser exception, rather than a
-// token manager error (which hides the line numbers).
TOKEN:
{
<#UNKNOWN: (~[" ","\t","\n","\r","\f" ])+ >
}
-/*
-# Local Variables:
-# tab-width: 4
-# indent-tabs-mode: nil
-# comment-default-style: "//"
-# End:
-*/
[2/4] git commit: Typo
Posted by an...@apache.org.
Typo
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/47c7f4be
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/47c7f4be
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/47c7f4be
Branch: refs/heads/master
Commit: 47c7f4be6a9febe9ecd6ccbc081d8512def2549e
Parents: c2fc9f5
Author: Andy Seaborne <an...@apache.org>
Authored: Sat Nov 1 18:48:49 2014 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Sat Nov 1 18:48:49 2014 +0000
----------------------------------------------------------------------
.../main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggNull.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/47c7f4be/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggNull.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggNull.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggNull.java
index 18edbab..10283b7 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggNull.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/expr/aggregate/AggNull.java
@@ -25,7 +25,7 @@ import com.hp.hpl.jena.sparql.expr.NodeValue ;
import com.hp.hpl.jena.sparql.function.FunctionEnv ;
/** The null aggregate (which can't be written in SPARQL)
- * calculates nothering but does help remember the group key
+ * calculates nothing but does help remember the group key.
*/
public class AggNull extends AggregatorBase
{
[4/4] git commit: Framework for work on JENA-803.
Posted by an...@apache.org.
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 <an...@apache.org>
Authored: Sat Nov 1 19:04:59 2014 +0000
Committer: Andy Seaborne <an...@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) */