W3C home > Mailing lists > Public > public-rdf-comments@w3.org > March 2013

Re: Turtle 2013 grammar improvement suggestion

From: Dave Beckett <dave@dajobe.org>
Date: Wed, 06 Mar 2013 20:49:39 -0800
Message-ID: <51381C63.6030403@dajobe.org>
To: Eric Prud'hommeaux <eric@w3.org>
CC: public-rdf-comments@w3.org
On 3/4/13 12:16 PM, Eric Prud'hommeaux wrote:
> * Dave Beckett <dave@dajobe.org> [2013-03-04 09:42-0800]
>>
>> http://www.w3.org/TR/2013/CR-turtle-20130219/
>>
>> In the grammar it is easier to read if quotes inside quotes are
>> always written in hex like #xHH
>>
>> e.g in rules [24] and [25] about long single and double quotes it
>> would be easier to read if it was expressed the way it was written in
>> rules [22] and [23] where double quote is written as #x22
> 
> Perhaps you only want to change the character ranges, i.e. change:
>   [24] STRING_LITERAL_LONG_SINGLE_QUOTE ::= "'''" (("'" | "''")? [^'\]       | ECHAR | UCHAR)* "'''"
>   [25] STRING_LITERAL_LONG_QUOTE        ::= '"""' (('"' | '""')? [^"\]       | ECHAR | UCHAR)* '"""'
>   [159s] 	ECHAR 	::= 	'\' [tbnrf\"']
> to read:
>   [24] STRING_LITERAL_LONG_SINGLE_QUOTE ::= "'''" (("'" | "''")? [^#x27\] | ECHAR | UCHAR)* "'''"
>   [25] STRING_LITERAL_LONG_QUOTE        ::= '"""' (('"' | '""')? [^#x22\] | ECHAR | UCHAR)* '"""'
>   [159s] 	ECHAR 	::= 	'\' [tbnrf\#x22#x27]
> 
> Changing all quotes per <http://www.w3.org/TR/xml/#NT-Char> would be rather verbose:
>   [22]   STRING_LITERAL_QUOTE             ::= #x22 ([^#x22#x5C#xA#xD] | ECHAR | UCHAR)* #x22
>   [23]   STRING_LITERAL_SINGLE_QUOTE      ::= #x27 ([^#x27#x5C#xA#xD] | ECHAR | UCHAR)* #x27
>   [24]   STRING_LITERAL_LONG_SINGLE_QUOTE ::= #x27 #x27 #x27 ((#x27  | #x27 #x27 )? [^#x27#x5C] | ECHAR | UCHAR)* #x27 #x27 #x27
>   [25]   STRING_LITERAL_LONG_QUOTE        ::= #x22 #x22 #x22 ((#x22  | #x22 #x22 )? [^#x22#x5C] | ECHAR | UCHAR)* #x22 #x22 #x22
>   [172s] PN_LOCAL_ESC                     ::= '\' ('_' | '~' | '.' | '-' | '!' | '$' | '&' | #x27 | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' | '@' | '%')
> and maybe change \ to #x5C as well.
> 
> Can you reply with a grammar which shows which extreme, or point between the extremes, you feel is most useful to readers?

I just said quotes inside quotes

so use '#x22#x22#x22' instead of '"""' etc.

It was just a suggestion for those squinting at tiny pixels of quotes.

Dave
Received on Thursday, 7 March 2013 04:50:03 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:29:55 UTC