Re: test suite: syntax errors in construct/result-reif.ttl

Steve Harris wrote:
> 
> On 6 Jul 2007, at 15:05, Jeen Broekstra wrote:
> 
>>
>> DAWGers,
>>
>> Arjohn and I came across a few syntax errors in the
>> construct/result-reif.ttl Turtle file.
>>
>> Specifically, the construction:
>>
>>  [ rdf:subject _:gff ;
>>    rdf:predicate rdf:type ;
>>    rdf:object foaf:Person ] .
>>
>> is not valid Turtle (at least not according to the BNF at
>> http://www.dajobe.org/2004/01/turtle/), blank nodes can not
>> be denoted in this fashion. I have updated the file, it now reads:

We could use RDF/XML :-)

> 
> Doesn't rule [19] allow that? Also there's an example of the syntax  
> in section 4.
> 
> - Steve

[19] lets you have the [ :p1 :q1 ; :p2 :q2 ] form but it's allowed a s atop 
level form.

The top level rule for triples is

[2] statement ::= directive ws* '.' ws* | triples ws* '.' ws* | ws+
[4] triples   ::= subject ws+ predicateObjectList

which does not let [19] stand on it's own.

Ditto a non-empty list like (1 2 3).

Both are legal in SPARQL and N3, I believe.

N3 in cwm also allows

  [] .
  () .

but these generate no triples.

FWIW: Jena parses (in normal mode for Turtle or N3) this form but does not 
write it.
"be generous with what you accept, be strict with what you generate"

	Andy

(despite me having moved over the construct/ directory and checked in the 
originals, the content came from elsewhere).

-- 
Hewlett-Packard Limited
Registered Office: Cain Road, Bracknell, Berks RG12 1HN
Registered No: 690597 England

Received on Friday, 6 July 2007 16:55:27 UTC