Re: Escape sequences (SPARQL and Turtle)

On 30 Nov 2011, at 13:49, Andy Seaborne wrote:

> 
>>> PS I have prototyped [1] in SPARQL and nothing broke nor were any
>>> tests affected.
>> 
>> OK, good to know. Does it do anything the the class of parser
>> required to tackle SPARQL? I don't know how lexers etc. tackle
>> escapes.
> 
> No change to the features required.

OK, great.

… text removed …

>> I imagine that adding a load of characters to what you're allowed to
>> put right of the : in a qname in SPARQL will break things?
> 
> Putting them in without a \ will break SPARQL 1.0, unless we assume whitespace around prefix names, and SPARQL 1.1 property paths.
> 
> 
> e.g. SPARQL 1.0 it's extreme but
>   a:b:c:d.
> which isn't a good idea but is legal - it's
>   a:b  :c  :d .

Right, yeah. Probably wasn't a good idea in retrospect, but a bit late now.

> If triggered by having \ before the character there's no problem because e.g. \: isn't legal anywhere at all (again, like "strings \" with quotes").
> 
> The code needs to de-escape the string if your toolkit doesn't (JavaCC doesn't but the escape code is the same as strings so already existed for me).

Sure, that's not the end of the world though.

- 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 Wednesday, 30 November 2011 17:49:18 UTC