Fixing error in Turtle and Trig grammars

Hi Eric,

No problem for EYE which is now 10 lines shorter :-)
http://sourceforge.net/p/eulersharp/code/6998/

$ eye --nope --wcache http://example.org/backslashes backslashes.ttl http://example.org/backslashes --pass
Id: euler.yap 6998 2014-02-12 23:40:33Z josd
SWI-Prolog 7.1.7 (x86_64-linux): Feb  9 2014, 00:29:15
starting 40 [msec cputime] 37 [msec walltime]
GET http://example.org/backslashes FROM backslashes.ttl SC=5
networking 2 [msec cputime] 1 [msec walltime]
#Processed by Id: euler.yap 6998 2014-02-12 23:40:33Z josd
#eye --nope --wcache http://example.org/backslashes backslashes.ttl http://example.org/backslashes --pass

<http://example.org/s> <http://example.org/p> " ''' ".
<http://example.org/s> <http://example.org/p> " \"\"\" ".
<http://example.org/s> <http://example.org/p> " \"\"a ".
<http://example.org/s> <http://example.org/p> "\"\"\"".
<http://example.org/s> <http://example.org/p> "\"\"a".

TC=5 TP=10 BC=0 BP=0 PM=0 CM=0 FM=0 AM=0
reasoning 1 [msec cputime] 1 [msec walltime]

#ENDS 0.043 [sec] TC=5 TP=10 BC=0 BP=0 PM=0 CM=0 FM=0 AM=0


 

Kind regards,

Jos De Roo | Agfa HealthCare
Senior Researcher | HE/Advanced Clinical Applications Research
http://www.agfa.com/w3c/jdroo
http://twitter.com/josderoo

Agfa HealthCare NV, Moutstraat 100, B-9000 Gent, Belgium
http://www.agfa.com/healthcare

-----"Eric Prud'hommeaux" <ericw3c@gmail.com> wrote: -----
To: public-rdf-comments@w3.org
From: Eric Prud'hommeaux 
Sent by: "Eric Prud'hommeaux" 
Date: 02/12/2014 09:42PM
Cc: semantic-web@w3.org
Subject: Fixing error in Turtle and Trig grammars

The RDF Working Group recently discovered an error in the grammars for
Turtle and TriG. They were intened to align with SPARQL, but a pair of
parentheses was accidentally dropped from the definition for long
strings resulting in an over-constraint on what's permitted after
embedded quotes. An example of the error is shown by the text

   """ ""\" """

which is allowed by the SPARQL grammar, but was accidentally
disallowed by the grammars for Turtle and TriG in their specifications.
After considering this matter, the acting W3C Director has asked us to
make sure implementors agree this is an error and will in the coming
weeks make sure their implementations parse the intended language,
aligned with SPARQL.

Please let us know by 18 Feb if you intend to implement the following
grammar and parse the syntax tests below:

change
[24] STRING_LITERAL_LONG_SINGLE_QUOTE ::= "'''" (("'" | "''")? [^'\] | ECHAR | UCHAR)* "'''"
[25] STRING_LITERAL_LONG_QUOTE          ::= '"""' (('"' | '""')? [^"\] | ECHAR | UCHAR)* '"""'
to
[24] STRING_LITERAL_LONG_SINGLE_QUOTE ::= "'''" (("'" | "''")? ([^'\] | ECHAR | UCHAR))* "'''"
[25] STRING_LITERAL_LONG_QUOTE          ::= '"""' (('"' | '""')? ([^"\] | ECHAR | UCHAR))* '"""'

and parse these (one-line) turtle documents (with some arbitrary base URI):

<s> <p> ''' ''\' ''' .

<s> <p> """ ""\" """ .

<s> <p> """ ""\u0061 """ .

<s> <p> """""\"""" .

<s> <p> """""\u0061""" .


Many thanks for your help and continued support of RDF 1.1.

-- 
-ericP, on behalf of the RDF Working Group

office: +1.617.599.3509
mobile: +33.6.80.80.35.59

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.

There are subtle nuances encoded in font variation and clever layout
which can only be seen by printing this message on high-clay paper.

Received on Wednesday, 12 February 2014 23:54:57 UTC