Re: Please make sure the grammar is directly machine consumable.

On 19 Aug 2005, at 04:12, Tim Berners-Lee wrote:

> Richard,
>
> I didn't realize the grammar in the spec is machine-generated.
> Maybe it should be hand-edited and everything else
> generated from it.

I think that would be a good idea from one point of view (mine and  
yours, certainly!), but we'd have to see what the current maintainers  
of the SPARQL grammar think.

> Yosi (on vacation right now) has generated (with a small hand tweak)
> the CFG grammar in RDF from the spec.   (See sparql* in
> http://www.w3.org/2000/10/swap/grammar/
> )  This is in plain BNF (  cfg:mustBeOneSequence properties
> with nested RDF collections )
>
> See the bnf.n3 ontology in that directory as well as
> the bnf-rules.n3 which go from some forms of ebnf to bnf,
> also in that directory.

Very handy (and pretty cool!). As it seems the tools are in place, it  
would be nice to have a machine-readable 'spec' grammar that could be  
re-purposed into presentation EBNF, JavaCC, plain BNF, etc. -- this  
would certainly save me a lot of work whenever the grammar changes!

It is also nice, in an "eating one's own dog food" way, to have the  
grammar itself in RDF.

-R

Received on Saturday, 20 August 2005 22:40:23 UTC