W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > November 2004

Re: Sparql grammar questions/comments

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Mon, 15 Nov 2004 11:46:01 +0000
Message-ID: <419896F9.8010008@hp.com>
To: Geoff Chappell <geoff@sover.net>
Cc: public-rdf-dawg-comments@w3.org



Geoff Chappell wrote:
> I've been building a simple parser/translator from sparql to RDF Gateway's
> query language (in our scripting language). It's been mostly straight
> forward except around expressions. Things seem a bit murky there in the
> grammar.

The published working draft does not cover constaints very much - tehgrammr is 
just one reflection of this.

> For example things like this are seemingly allowed:
> 
> 	... OPTIONAL AND ?a>2
> 
> or 
> 	
> 	... SOURCE ?src AND ?x=='huh?'
> 
> which I can't translate because I don't really know what they mean.
> 
> Also it seems that an expression could just be:
> 
> 	AND ?x
> 
> Is that intended to be a valid expression?

The examples you give will need soring out - the published grammar is a 
permissive one and is supposed to cover what's right without being very tight on 
what's wrong.

Also, expressions are not typed in the grammar, as is usual in programming 
languages, and there would need to be additional checking after syntactic parsing.

> 
> What about:
> 
> 	AND ?a eq ?b eq 'dog'
> 
> Would you interpret that as (?a eq ?b) eq 'dog'? or (?a eq ?b) && (?b eq
> 'dog')?

The grammar says (?a eq ?b) eq 'dog', not that it makes a lot of sense.

> 
> I guess I'm wondering if I should just hold off on playing with expressions
> for a bit (i.e. the grammar isn't really ready yet for close inspection).
> Or...?
> 
> Also, though I guess you haven't published it for comments yet, two thumbs
> up anyway for the initial protocol draft
> (http://monkeyfist.com/kendall/sparql-protocol/). I'm so happy to see that
> the protocol will include update capabilities - makes it hugely more useful.
> 
> 
> Thanks,
> 
> Geoff Chappell

Thanks for the comments,

	Andy
Received on Monday, 15 November 2004 11:46:13 GMT

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