W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > May 2012

Re: Whitespace should be allowed before and after a Query or Update

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Sat, 26 May 2012 15:04:55 +0100
Message-ID: <4FC0E307.80709@epimorphics.com>
To: public-rdf-dawg-comments@w3.org

On 25/05/12 20:07, David Booth wrote:
> I mention this because one SPARQL server that I just tried barfed on a
> query that began with a comment, which seem rather unfriendly.

Have you provided feedback to the implementers?

> When I checked the SPARQL spec I see that section 19.4 says that
> comments are treated as white space
> http://www.w3.org/TR/sparql11-query/#grammarComments
> but the discussion of whitespace in sec 19.3
> http://www.w3.org/TR/sparql11-query/#whitespace
> says that whitespace is used to *separate* two terminals.

Partial quote : it goes on to say:

which would otherwise be (mis-)recognized as one
terminal. Rule names below in capitals indicate where white space is 
significant; these form a possible choice of terminals for constructing 
a SPARQL parser. White space is significant in strings.

i.e. WS may be needed in certain places to get the right tokens and is 
significant inside terminals.

For example (SPARQL 1.0)

a:bc:de:f .

Is it:

a:b  c:d  e:f .


a:bc  :  de:f .

or something else.

> Thus AFAICT, as currently written the spec currently forbids whitespace
> before and after a Query or Update, which certainly seems wrong, as
> whitespace (or comments) should be allowed both before and after.

I've added

"Otherwise, white space is ignored between tokens."

> Thanks!

Received on Saturday, 26 May 2012 14:05:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:12 UTC