Re: Turtle 2013 grammar improvement suggestion

Since this was a suggestion not a concern - I am happy that this thread is
resolved, you do not need to consider it further.

Dave

On 3/7/13 7:20 AM, Eric Prud'hommeaux wrote:
> * Dave Beckett <dave@dajobe.org> [2013-03-06 20:49-0800]
>> 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.
> 
> Ahh, makese sense, but we'd have to augment the XML grammar notation
> which allows for #xN, but not inside ""s or ''s.
> 
>   http://www.w3.org/TR/REC-xml/#sec-notation
> 
> Noting that [172s] PN_LOCAL_ESC includes '#', we'd have to invent more
> escaping syntax for use inside ""s and ''s, e.g. '\#x22\#x22\#x22'.
> http://www.w3.org/TR/2013/CR-turtle-20130219/#grammar-production-PN_LOCAL_ESC
> 
> In net, I think it's safer to make people squint, since cut and paste
> do the right thing.
> 
> Please reply with "I couldn't be happier" to indicate that your
> concearns have been addressed.
> 
> 
>> Dave
>>
>>
> 

Received on Sunday, 17 March 2013 04:03:55 UTC