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

Collection / Grammar Issue

From: Alex Milowski <alex@milowski.com>
Date: Wed, 15 May 2013 16:41:05 -0700
Message-ID: <CABp3FN+1vHREjpgeEW1MyoTPA-O+nVstWJWjkP+4Ee6s5BcixA@mail.gmail.com>
To: public-rdf-comments@w3.org
I ran across a problem while implementing a Turtle parser.

In section 3 of [1], the 7th example is:

@prefix : <http://example.org/stuff/1.0/> .
(1 [:p :q] ( 2 ) ) .

The production for triples in section 6.5 is:

[6] triples ::= subject predicateObjectList | blankNodePropertyList
[7] predicateObjectList ::= verb objectList (';' (verb objectList)?)*
[10] subject ::= iri | BlankNode | collection

According to these productions, the example is invalid.  The subject
reduces to the collection and must be followed by a verb.  Yet, the example
does not have a following predicate object list.

If this is truly suppose to be valid, I think the productions need to be:

   triples ::= subject predicateObjectList |
                        collection predicateObjectList? |
                        blankNodePropertyList predicateObjectList?
   subject ::= iri | BlankNode

BTW, it would be a wonderful editorial change to number the examples.

[1] http://www.w3.org/TR/2013/CR-turtle-20130219/

--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language

Bertrand Russell in a footnote of Principles of Mathematics
Received on Wednesday, 15 May 2013 23:41:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:59:33 UTC