W3C home > Mailing lists > Public > public-rdf-comments@w3.org > September 2012

Re: N3 and Turtle Syntax Questions

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Tue, 11 Sep 2012 12:32:58 +0100
Message-ID: <504F216A.9040900@epimorphics.com>
To: public-rdf-comments@w3.org
> I would like the syntax to allow comma and semicolon as a terminator
> (and thus also to be compatible with N3).

N3 seems to not accept comma as a terminator:

--------
@prefix : <http://example/> .

:s :p :o1 , :o2 , .
--------

because:

[[ http://www.w3.org/2000/10/swap/grammar/n3.n3
objecttail cfg:mustBeOneSequence (
		( )
		( ","   object objecttail )
	).
...
object cfg:mustBeOneSequence ((expression)).
]]

"," must be followed by an object and so is not a terminator.

(checked with cwm 1.2.1)


cwm 1.2.1 does accept:

--------
@prefix : <http://example/> .

:s :p :o1 ; :q :o2 ; .
--------

because

[[
propertylist cfg:mustBeOneSequence (
		( )
		( predicate  object objecttail propertylisttail )
	).

propertylisttail cfg:mustBeOneSequence (
		( )
		( ";" propertylist )
	).
[[

and "propertylist" can be empty.

	Andy
Received on Tuesday, 11 September 2012 11:33:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 September 2012 11:33:26 GMT