On Thu, 2013-09-19 at 18:00 +0100, Marcin Wojdyr wrote: > On Thu, Sep 19, 2013 at 04:38:12PM +0100, Peter Keller wrote: > > > > > > > If there are discrepancies between IUCR website and IT vol.G and it would > > > be worth to list them. > > > > It is not a matter of discrepancies: they are rather different, and if > > you are active in this area, you really need to see the IT ones as well. > > I'm not active, but after finding and opening IT vol. G on page 28 > I see exactly the same lines that you gave as examples. > So I'm not convinced.
OK - all that means is that the grammar in chapter 2.2 suffers from the same problem as the one on the IUCr's web pages, i.e. if you translate it directly into the input for a parser generator like yacc, bison or ANTLR, that parser won't work properly. The STAR grammar in chapter 2.1 is the accurate one. If you look at page 18, you will see that the productions for quoted text strings are completely different from the ones in chapter 2.2. I accept that it is also more complex than the grammar in chapter 2.2, and unfortunately that complexity has to be catered for correctly in code that reads and writes CIF's. Failure to do this creates dialects of CIF. Where incompatibilities between these dialects are encountered, it is users rather than developers that are first faced with the (massively irritating) task of translating their data from one dialect to another, not developers. This is why it is important that developers get this correct from the start, either by making the effort to understand the formats that they are dealing with fully, or by using code/libraries written by other developers who have made that effort. This, of course, is where this whole thread started :-) Regards, Peter. -- Peter Keller Tel.: +44 (0)1223 353033 Global Phasing Ltd., Fax.: +44 (0)1223 366889 Sheraton House, Castle Park, Cambridge CB3 0AX United Kingdom
