W3C home > Mailing lists > Public > public-cwm-bugs@w3.org > February 2004

[closed] Re: N3 grammar bug with comma in collections

From: Tim Berners-Lee <timbl@w3.org>
Date: Sun, 29 Feb 2004 16:26:06 -0500
Message-Id: <E23CDAE2-6AFD-11D8-B007-000A9580D8C0@w3.org>
Cc: public-cwm-bugs@w3.org
To: Dave Beckett <dave.beckett@bristol.ac.uk>

> cwm (and jena's n3 parser) seem to implement something different than
> specified in the Notation3 grammar.
>
> Specifically, the grammar says this:
> [[
> objectlist
>     object
>     object , objectlist
> ]] -- http://www.w3.org/DesignIssues/Notation3.html
>
> and in the RDF/n3 one:
> [[
> objecttail bnf:mustBeOneSequence (
>                 ( )
>                 ( ","   object objecttail )
>         ).
> ]] -- http://www.w3.org/2000/10/swap/grammar/n3.n3
>
>
> So a comma is required between entries.

Yes, this is an objectlist as in a sentence with several triples of the 
same subject and predicate, like

:Joe  :child  :Egbert, :Marmaduke.

objecttail is used in propertlist, which is used in [ propertylist ] as 
an anonymous node,
and in statement:

statement bnf:mustBeOneSequence(( subject propertylist )).




> cwm implements something else - commas are forbidden.
>
> Failing test with cwm:
> @prefix : <http://example.org/stuff/1.0/> .
> :a :b ( "apple", "banana" ) .

That is a list in the sense of a collection. In the grammar, ( pathlist 
).
Pathlist has no commas.

> Passing test with cwm:
> @prefix : <http://example.org/stuff/1.0/> .
> :a :b ( "apple" "banana" ) .
>
> I need to change turtle one way or the other to match.  I assume
> the grammar is in error.

I think you just got the productions crossed.  If I have missed 
something, let me know.  Thanks for implementing it.    Maybe we should 
make various levels of common test suite.

Tim

> Dave
Received on Sunday, 29 February 2004 16:26:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:10:58 GMT