W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2012

Re: Motivation for INSERT DATA syntax

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Fri, 05 Oct 2012 10:16:00 +0100
Message-ID: <506EA550.3050003@epimorphics.com>
To: public-rdf-dawg@w3.org
Thomas,

Grammar note 7 covers this point:

"""
The tokens INSERT DATA, DELETE DATA, DELETE WHERE allow any amount of
white space between the words.  The single space version is used in the 
grammar for clarity.
"""

Writing it as a single token means that the grammar is LL(1).  It would 
have to be rewritten it with a single rule starting 'DELETE' , followed 
by all the possibilities.

Instead each update operation gets it's own grammar rule and we have:

"""
[30]  Update1  ::=
   Load | Clear | Drop | Add | Move | Copy | Create |
     InsertData | DeleteData | DeleteWhere | Modify
"""

The MOVE etc case is made different by the optional 'SILENT'

'MOVE' 'SILENT'?

	Andy

On 04/10/12 21:06, Thomas Visel wrote:
> I am Thomas Visel with Algebraix Data, developing their SPARQL 1.1
> parser.  I have been an unspeaking lurker with this /dawg/ for the past
> half year.
>
> Regarding ‘/INSERT DATA’/, ‘/DELETE DATA/’ and /‘DELETE WHERE’ :  W/hy
> the required (single) space between the words?  The required space seems
> out of place.  Why not one-or-more spaces instead?
>
> This contrasts with the COPY SILENT and the like just above it,
> specified as ‘COPY’  ‘SILENT’ and allowing one or more spaces.
>
> ^
>
> /  [36] //Move/ = 'MOVE'//'SILENT'/? GraphOrDefault
> <http://www.w3.org/TR/sparql11-query/#rGraphOrDefault>
> /'TO'/GraphOrDefault <http://www.w3.org/TR/sparql11-query/#rGraphOrDefault>/
>
> /  [37] //Copy/ = 'COPY'//'SILENT'/? GraphOrDefault
> <http://www.w3.org/TR/sparql11-query/#rGraphOrDefault>
> /'TO'/GraphOrDefault <http://www.w3.org/TR/sparql11-query/#rGraphOrDefault>/
>
> /  [38] //InsertData/ = 'INSERT DATA'/QuadData
> <http://www.w3.org/TR/sparql11-query/#rQuadData>/
>
> /  [39] //DeleteData/ = 'DELETE DATA'/QuadData
> <http://www.w3.org/TR/sparql11-query/#rQuadData>/
>
> One other SPARQL parser tested loosens from the spec, allowing multiple
> spaces between the word pairs.  Was the spec so worded just to make it
> easy to parse without using resolvers, or is there something I’m missing
> here?
>
> Thomas Visel
>
> tvisel@algebraixdata.com <mailto:tvisel@algebraixdata.com>
>
Received on Friday, 5 October 2012 09:16:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:49 GMT