On 23/04/15 05:46, Holger Knublauch wrote:
I just noticed that Jena successfully parses query strings such as
"ASKWHERE {}" and "SELECTDISTINCT* WHERE{}". Looking at the Grammar in
the SPARQL 1.1 spec, shouldn't there be a whitespace character somewhere?
Thanks
Holger
Hi Holger,
Tokenizing finds the longest match in a stream of chars, not a delimited
match.
ASKWHERE is <ASK><WHERE> in tokens. ASK is the first longest match,
then restarting, WHERE.
Whitespace is only needed where otherwise other tokens would be matched.
See
http://www.w3.org/TR/sparql11-query/#whitespace
http://www.w3.org/TR/sparql11-query/#sparqlGrammar Note 4.
(or in practical terms, javacc just does it with no smarts)
GROUPBY
INSERTDATA
NOTIN
just because you can write with very little whitespace does not mean it
is a good idea!
LIMIT100
Andy