- From: Dan Connolly <connolly@w3.org>
- Date: Thu, 29 Apr 2010 12:56:22 -0500
- To: Dominique Hazael-Massieux <dom@w3.org>
- Cc: spec-prod <spec-prod@w3.org>
On Thu, 2010-04-29 at 18:18 +0200, Dominique Hazael-Massieux wrote: > Hi, > > As I was having a cursory look at the definition of the RIF language in > EBNF [1], and wanted to quickly check the validity of the grammar using > existing tools such as abnfgen [2] or bnf_check, the following (somewhat > unstructured) thoughts occurred to me: > • for better or for worse, XML defined its own EBNF syntax [4] that > differs from the ISO standard [5]; given that a number of W3C specs keep > using that specific syntax, and given that there are more tools that > recognize the ISO syntax, it would be nice to have a converter from the > W3C syntax into the ISO one — does anyone know if that exists? I have python code to read "W3C syntax" (i.e. the one in the XML spec) and write it out in turtle... http://www.w3.org/2000/10/swap/grammar/ebnf2turtle.py it should be straightforward to adapt it to write out the ISO syntax... but... why? Is there a network of tools and practice around the ISO syntax? I also have javascript code to read IETF ABNF syntax a la that abnfgen tool. Hmm... http://bitbucket.org/DanC/urlp/src/tip/abnf.js (also in http://jay.w3.org/~connolly/projects/urlp/ ) Some other relevant pointers... a notation3 grammar in XML formal grammar notation / EBNF http://lists.w3.org/Archives/Public/public-cwm-talk/2006AprJun/0032.html bnf2turtle -- write a turtle version of an EBNF grammar by connolly on Fri, 2006-02-10 http://dig.csail.mit.edu/breadcrumbs/node/85 We need a EBNF spec Bjoern Hoehrmann (Monday, 9 January) http://lists.w3.org/Archives/Public/spec-prod/2006JanMar/thread.html#msg0 > • RIF refers to a number of EBNF defined in other W3C specs (in > particular XML Namespaces and SPARQL); I wonder if having a catalog of > the existing EBNF defined in various specifications wouldn't facilitate > both the re-usage of these EBNF and their testing — right now, to create > the full RIF EBNF grammar requires a lot of easy-to-get wrong copy & > pasting, that an EBNF catalog could presumably facilitate; is this a > goofy idea? has anyone heard of a tool allowing to manage/catalog EBNF > productions? Having the RIF BNF as one file that you don't have to copy/paste from is a very good idea. Trying to collect the BNFs from all W3C specs... ugh... resist the urge to centralize! I suppose the QA matrix has been valuable, but... is it maintained any more? People ask for lists of DTDs... I don't really see the appeal. Why not lists of .png images in specs while we're at it? > > Dom > > 1. > http://www.w3.org/TR/2009/CR-rif-dtb-20091001/#sec-shortcuts-constants > 2. http://www.quut.com/abnfgen/ > 3. http://www.icosaedro.it/bnf_chk/index.html > 4. http://www.w3.org/TR/REC-xml/#sec-notation > 5. http://www.iso.org/iso/catalogue_detail.htm?csnumber=26153 > > > > -- Dan Connolly, W3C http://www.w3.org/People/Connolly/ gpg D3C2 887B 0F92 6005 C541 0875 0F91 96DE 6E52 C29E
Received on Thursday, 29 April 2010 17:56:24 UTC