Re: Checking: Turtle grammar / N-Triples Grammar

* Andy Seaborne <andy.seaborne@epimorphics.com> [2012-05-16 10:30+0100]
> In case it helps to get Turtle doc to publication, I did some
> checking of the 2012-05-16T10:00:00+01:00 Turtle and N-Triples
> grammars because this is last call.  I also went over Eric's message
> of 11/May.

The outcome of that work was in the yacker turtleAwesome bnf and the
grammar attached to the message. I attacked exactly the same issues
you did. My intent was to vet that grammar with the WG before
transplanting into the Turtle spec. Does that grammar look good to
you?

Note a challenge to IRIREF below.

> 	Andy
> 
> ==== 3 Corrections
> 
> == Turtle
> 
> Two things needs correcting, all the rest are presentational issues
> and do not need to be changed for LC
> 
> ** Correction 1 **
> Star in wrong place:
> 
> [132s]	IRIREF	::= ('<' ([^<>"{}|^`\]-[#x00-#x20])* | UCHAR '>')
> 
> should be
>   ('<' ([^<>"{}|^`\]-[#x00-#x20]) | UCHAR '>')*
> that is:
> [132s]	IRIREF	::= ('<' ([^<>"{}|^`\]-[#x00-#x20]) | UCHAR '>')*

I believe that would match "", "<a>" and "<a><b><c>" as a single
IRIREF. I think the change below captures the intension:

[[
  Simplified IRIREF from
   [132s] IRIREF ::= ('<' ([^<>"{}|^`\]-[#x00-#x20])* | UCHAR '>')
  to
   [132s] IRIREF ::=  '<' ([^#x00-#x20<>\"{}|^`\\] | UCHAR)* '>'
  (#sec-notation doesn't tell me the precedence of A | B - c)
]]


> ** Correction 2 **
> 
> [149s]
> STRING_LITERAL1 and STRING_LITERAL2 are the same.
> 
> STRING_LITERAL_1 should use "'" ... "'"
> not '"'
> 
> == N-Triples
> ** Correction 3 **
> Same fix for [132s] as Turtle
> 
> 
> ==== Presentational
> 
> == Turtle
> 
> feel free to ignore for publication:
> 
> 1/ The rule numbers to relate to SPARQL are out of date (while
> useful, they are a hostage to fortune - I'd number rules for Turtle
> only)
> 
> 2/ After reflecting on yesterdays discussion, and noting the greedy
> tokenization rule, the (WS)+ are not needed.
> 
> '@base' (WS)+
> 
> The (WS)+ isn't needed because
> 
> @baseprefix:<foo>.
> 
> fails because @baseprefix is a LANGTAG.
> 
> 3/ Use of ' as quote where it is also a character:
> 
> [151s] "'''" ... "'''"
> [166s] "'"
> 
> 
> 4/ Excessive parentheses:
> 
> [60s], [151s], [152s], [162s] have occurrences of doubly nested
> parentheses: ((...))
> 
> 5/ More parentheses than necessary
> 
> This is stylistic.
> 
> [6], [9], [10], [12], [14], [66s], [67s], [135s], [19], [20],
> [21], [22], [149ss], [150s], [155s], [157s], [158s]
> 
> == N-Triples
> 
> 1/ Double parens: [6], [135s], [150s]
> 
> 2/ More parentheses than necessary
> [3], [5], [19], [158s], [160s], [162s]
> 

-- 
-ericP

Received on Wednesday, 16 May 2012 13:50:15 UTC