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

> 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 UTC