[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Backus-Naur Form for CIF

[Please ignore if this is a double posting but listproc@iucr.org seemed to 
have lost my name]

At 09:09 03/10/00 +0100, Nick Spadaccini wrote:

Thanks very much Nick,
         This is the response I had hoped for and expected :-)

>On Mon, 2 Oct 2000, Peter Murray-Rust wrote:
>
> > I support this requirement for testing. I believe that the IETF requires
> > two independent implementations of a proposed protocol to show that it is
> > workable. I have read the BNF by eye but have no comments (other than to
> > agree it is an important document) . In principle it should be tested 
> against:
> >          - example files (both conforming and non-conforming)
> >          - yacc-like tools.
> > I know this is tedious - and furthermore I am not offering to do it :-(  -
> > but it is a necessary part of the process.
> >
> > (I hope to write more about CIF tools in general shortly).
>
>I have these for star, a yacc description which is the basis for starbase
>and a javacc description which is the basis for dREL, the methods language
>we have embedded into the STAR dictionaries.

These show that the BNF is syntactically correct and that the productions 
can be appropriately linked. [In defining XML I think there is was one 
production that was never actually reached from all the others - this isn't 
always obvious. It doesn't invalidate things, but can be confusing.]


>These are two independent implementations, the first using an LALR grammar
>spec and the latter using an LL(k) grammar. I also have (as we all do) a
>suite of conforming and non-conforming test decks.

Excellent. Both of these should explore trivial files as well as large ones 
(e.g. "empty" documents, identifiers consisting only of a "_", data 
consisting of "_" and other horrors!). These files are important not just 
to test the BNF but also as a reference for anyone who wishes to build a 
CIF/STAR-compliant tool.

For the record one of the earliest XML parsers was built by Norbert Mikula 
using javacc (I think - anyway a E/BNF-based tool). The resultant parser 
was naturally larger than minimal but acted as an excellent way of defining 
the language. So a javacc-based CIF parser could be a useful tool to build 
additional tests onto (e.g. sorting, data checking and otehr constraints).

         Well done.

         P.

PS My spell checker has just suggested "PdCIF" as a replacement for 
"Spadaccini "!


>Nick
>
>--------------------------------
>Dr Nick Spadaccini
>Department of Computer Science              voice: +(61 8) 9380 3452
>University of Western Australia               fax: +(61 8) 9380 1089
>Nedlands, Perth,  WA  6907                 email: nick@cs.uwa.edu.au
>AUSTRALIA                        web: http://www.cs.uwa.edu.au/~nick

Peter Murray-Rust, Director Virtual School of Molecular Sciences
Pharmaceutical Sciences, University of Nottingham, NG7 2RD, UK
Tel: +44-(0)-115-951-5087 Fax: +44-(0)-115-951-5110
http://www.vsms.nottingham.ac.uk 


Reply to: [list | sender only]