W3C home > Mailing lists > Public > public-rdf-comments@w3.org > February 2014

Re: Fixing error in Turtle and Trig grammars

From: Andy Seaborne <andy@apache.org>
Date: Wed, 12 Feb 2014 22:55:43 +0000
Message-ID: <52FBFBEF.9000808@apache.org>
To: public-rdf-comments@w3.org
Hi Eric,

Apache Jena parses the test cases and long string literals as per the 
corrected rules.

	Andy

With a base URI of <http://example/>:

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


On 12/02/14 20:42, Eric Prud'hommeaux wrote:
> 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.
>
Received on Wednesday, 12 February 2014 22:56:12 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 12 February 2014 22:56:12 UTC