W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2009

RE: First attempt at a grammar for SPARQL/query 1.1

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Mon, 31 Aug 2009 22:24:36 +0000
To: Steve Harris <steve.harris@garlik.com>, "public-rdf-dawg@w3.org Group" <public-rdf-dawg@w3.org>
Message-ID: <B6CF1054FDC8B845BF93A6645D19BEA3693CEC252C@GVW1118EXC.americas.hpqcorp.net>


> -----Original Message-----
> From: public-rdf-dawg-request@w3.org [mailto:public-rdf-dawg-request@w3.org]
> On Behalf Of Steve Harris
> Sent: 31 August 2009 22:44
> To: public-rdf-dawg@w3.org Group
> Subject: Re: First attempt at a grammar for SPARQL/query 1.1
> 
> On 28 Aug 2009, at 18:22, Seaborne, Andy wrote:
> >
> > In the design pages we have some different proposals for the syntax
> > of select expressions:  without mandating comma (which would break
> > backward compatibility), one case to remember is ?x-?y: Is that (?x-?
> > y) or "?x" followed by "-?y"?  This is why expressions get bracketed
> > a lot in SPARQL.
> 
> Mandating comma when AS is used wouldn't break back compatibility, as
> AS was not legal in SPARQL.

Steve, 

The three cases I found with syntax rules didn’t mandate commas (or mention them).  I couldn't see what is proposed under SurfaceSyntax exactly but I didn’t see a proposal for mandatory commas in the SELECT clause (meaning SELECT always has commas regardless of any AS or expressions - that breaks compatibility).

The proposal at Feature:SurfaceSyntax#Commas_in_expression_lists does not state mandatory or optional commas.  If the rationale is familiarity, optional commas would be sufficient won't it?  As optional, adding ","? between the terms of the SELECT elements works in the grammar doesn't it?

For Feature:SurfaceSyntax#Commas_in_expression_lists
Would I now be right in guessing that there would be two syntaxes proposed:

SELECT ?x ?y ?z 

SELECT ?x, ?y, (?z+1 AS ?A)
  Or alternatively
SELECT ?x, ?y, (?z+1) AS ?A


(aside: which I don't consider to be mandating commas - there's a non-comma form)

It does state that these two are equivalent: "SELECT ?a, ?b, ?c" and "SELECT ?a ?b ?c"
which I read as meaning that "SELECT ?a ?b ?c" (no commas) is still legal.

What about "SELECT ?x ?y , ?z"?
What happens if ?z or (?x+?y) is added to the SELECT with a comma?  Does the earlier part now need to have commas added?


(I found the statement "and it also makes the syntax of AS easier to read," too black&white.  I don’t find it easier to read but that is considering only one AS design.)

	Andy

> 
> - Steve
> 
> --
> Steve Harris
> Garlik Limited, 2 Sheen Road, Richmond, TW9 1AE, UK
> +44(0)20 8973 2465  http://www.garlik.com/

> Registered in England and Wales 535 7233 VAT # 849 0517 11
> Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10
> 9AD
> 

Received on Monday, 31 August 2009 22:26:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:08:26 GMT