Re: separator/terminator ;

This feature can be done but it may have consequences:

Example: Turtle:

triples  ::=  subject ws+ predicateObjectList
predicateObjectList ::= verb ws+ objectList ( ws* ';' ws* verb ws+ objectList )* 
(ws* ';')?

so:

:x :p :v ; :q :w :z .

is legal as triples

:x :p :v .
:q :w :z .

because a triple can be "x y z ;"


To help establish a baseline, could you let me know what's the official, 
definitive grammar for N3?  Is it the N3 version or one of the Python parsers?

Hmm - there are whitespace differences as well.

e.g.

<a><b><c>

is legal N3 (according to cwm) but not Turtle because there is no WS after the 
subject and no trailing dot for the triple.

What would be most useful is a principle for resolving these rather than a case 
by case basis.

 Andy


Dan Connolly wrote:
> sparqler (http://sparql.org/query.html )seems to like
> 
> SELECT ?who WHERE
> {
>   [ rdf:subject ?work;
>     rdf:predicate sam:isAbout;
>     rdf:object ?topic
>   ] dc:creator ?who
> }
> 
> but not with a trailing semi
> 
> SELECT ?who WHERE
> {
>   [ rdf:subject ?work;
>     rdf:predicate sam:isAbout;
>     rdf:object ?topic;
>   ] dc:creator ?who
> }
> 
> When working on an N3 grammar, I was stumped for a while
> trying to allow this. I think I eventually made a separate
> token for "; followed by ]" as distinct from ;.
> 
> I haven't checked the SPARQL grammar yet, but I think
> this should be allowed.
> 

Received on Monday, 11 April 2005 10:55:01 UTC