W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > March 2005

Re: Grammar question

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Sun, 13 Mar 2005 18:30:40 +0000
Message-ID: <423486D0.5010901@hp.com>
To: Geoff Chappell <geoff@sover.net>
Cc: public-rdf-dawg-comments@w3.org

Geoff Chappell wrote:
> In the latest grammar VarOrTerm includes empty lists and empty blank nodes
> but does not include lists with content (Collection) or blank nodes with
> content (BlankNodePropertyList). Everywhere that VarOrTerm is used also
> offers alternatives using Collection and BlankNodePropertyList (except
> Reification - is that a mistake?).

And when I said (in the public reply) that that irregularity had been 
"fixed" I meant I fixed it this morning! - it had been nagging me for a day 
or so and I couln't decide whether to go for the regularity or for 
restricting the crazy stuff it is possible to write.  I went for regularity.

Even though I went for regularity, I wouldn't worry if:

   { ( [ << [:p :q ] << 1 2 3 >> [a [] ] >> ] ) }

were illegal syntax :-)

One irregularity I plan to keep (unless someone persuades me otherwise) is 
that property slots are not general - they must be URIs or variables.  No 
blank nodes, literals or TriplesNode expansions.  I don't see RDF getting 
literal arcs or arcs-with-triples.  Blanks arcs would very occasionally be 
useful but it's not RDF in spirit.

I'm just removing () and [] (and lists generally which seem to have sneaked 
in) from being in FILTER expressions because of confusion it creates for the 
parser if not for people.

For what it's worth, the master version is the master.jj file in ARQ CVS 
under Grammar/.  It's javacc and has further information like lookahead 
requirements.  This is for both SPARQL and ARQ.

	Andy

> So why not just make RDFTerm include
> lists with content, blank nodes with content, and reifications - e.g. like
> the unused AnyNode? (sort of like saying that you can use a noun phrase
> anywhere you can use a noun.) Seems like it would simplify the grammar plus
> avoid potential mistakes of omission (e.g. shouldn't reification be included
> in CollectionElement?). Or is there a necessary distinction that I'm
> missing?
> 
> Geoff
> 
> 
> 
> 
Received on Sunday, 13 March 2005 18:31:16 GMT

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