Re: Trailing dot in update grammar

On 2010-08-03, at 11:22, Andy Seaborne wrote:
> 
> 
> On 03/08/2010 10:54 AM, Steve Harris wrote:
>> Apologies if this is a known problem.
>> 
>> According to our implementation of the Update grammar, you can have a trailing dot in INSERT DATA, so:
>>    INSERT DATA { GRAPH<G>  {<s>  <p>  <o>  . } }
>> doesn't match the grammar, as far as we can see.
> 
> Could you explain the route through the grammar that forbids it? It would be helpful to know how you are going through the grammar rules and where you end up that forbids it.
> 
> A series of test cases to cover what you expect, and don't expect, would be good too :-)
> 
>> The goes against the spirit of SPARQL 1.0, and some examples given in the Update document, e.g. the example in 4.1.1 (though that example doesn't use the GRAPH keyword, so it's not exactly the same).
>> 
>> - Steve
>> 
> 
> [34] Insert ::= 'INSERT' ( 'DATA' QuadData | .... )
> [46] QuadData ::= '{' Quads '}'
> [43] Quads ::= TriplesTemplate?
>              ( QuadsNotTriples '.'? TriplesTemplate? )*
> [44] QuadsNotTriples ::= 'GRAPH' VarOrIRIref '{' TriplesTemplate '}'
> [45] TriplesTemplate  ::= TriplesSameSubject ( '.' TriplesTemplate? )?
> 
> and
> ( '.' TriplesTemplate? )?
> 
> can be a single '.'

OK, I think that makes sense. It hurts my head trying to unravel it though, and I guess our guy who turned it into a Lemon grammar made some mistake as well.

I'll contribute the syntax tests from our Update tests when I finish them.

Thanks Andy.

- Steve

-- 
Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  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 Tuesday, 3 August 2010 11:25:08 UTC