Re: SPARQL grammar... in BNF? N3?

On Feb 8, 2006, at 10:40, Dan Connolly wrote:

> Yosi, Tim, Eric,
>
> The SPARQL parser in cwm... it seems to be built from EricP's
> BNF...
>
>
> |    if web:
> |        File = urllib.urlopen('http://www.w3.org/2005/01/yacker/ 
> uploads/sparqlTest/bnf')
>  -- http://www.w3.org/2000/10/swap/sparql/sparql-grammar.py
>
> In the DAWG, the editors added a .jj version of the grammar
> and are considering what other formats to publish.
>   http://www.w3.org/2001/sw/DataAccess/rq23/parsers/sparql.jj
>   <- http://www.w3.org/2001/sw/DataAccess/rq23/parsers/
>   <- http://www.w3.org/2001/sw/DataAccess/rq23/#sparqlGrammar
>
> Is BNF the one we want/need?
>

Yes, please.  This has been a long-standing informal request.

> EricP, have you generated a turtle/n3 version of the SPARQL grammar?
>
> Yosi, what's the status of N3 parsers based on n3.n3?


AFAIK, there are several. Sean Palmer's n3p is built from n3.n3.
I think Yosi's sparql parser is dervied from n3p.
There is my predictiveParser.py which validates the test suite  
against n3.n3
but does not have the code to generate RDF triples.

> Do they
> work yet?

basically.
There is a test harness Yosi built
which seeems to have been used on 8 parsers. See the results table
http://www.w3.org/WWW/2000/10/swap/test/n3/test_results.html
The harness seems ready to be used to make a more refined answer to  
that question.

> What about using that approach for the SPARQL parser?
>

That is what Yosi basically did.
As I understood it, there was some human intervention in converting
the BNF.  I seem to remember that it was passed back to the DAWG
as a comment, and may have been fixed.

There is sparql parsing in the cwm regression test I think.

> -- 
> Dan Connolly, W3C http://www.w3.org/People/Connolly/
> D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E

Received on Wednesday, 8 February 2006 18:12:42 UTC