[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Reply to: [list | sender only]
RE: parser validation tools
- Subject: RE: parser validation tools
- From: "Bollinger, John Clayton" <jobollin@xxxxxxxxxxx>
- Date: Thu, 11 May 2000 16:05:18 +0100 (BST)
Richard Ball wrote: > How about a single-source COMCIFS-approved tool, along the > lines of vcif, > that'd rewrite (very quickly so you don't pay a big penalty > to use it) a > pathalogical STAR/CIF file into a more easily parsed/used > style? It'd not do > any dictionary checking or data validation, that'd be delegated to the > downstream parser, it would just structure things better: > > - all datablocks would start on a newline with no whitespace > - strip comments or put them on their own lines > - each dataname of a loop starts a line with no embedded blank lines > - the ; marking the end of a text block is the only > character on the line > - only one dataname/dataitem pair per line > - others? The common theme among all of those items seems to be that they are aimed at easing parsing via _record-oriented_ file handling, ala Fortran. They are no special boon when using stream-oriented file handling, ala C, Java, and others. My solution to the problem of Fortran not yet having stream I/O was to write some simple routines to emulate it, which wasn't too hard. One must also be able to pluck tokens out of the resulting pseudo-stream, but that's downright easy. The main usefulness of a CIF prettifier would be to make the CIF more readable to _humans_ (which might itself justify the development effort). I don't necessarily see such a tool as a big advantage to software developers -- especially to those not developing in Fortran. Along these lines, however, what might be more useful to developers is a CIF lexical analyzer, with appropriate Fortran, C (and perhaps other) bindings. That would obviate any need for the developer to prettify a CIF before inputting it to his own program, and give him a head start on his project at the same time. Just where that idea lies along the line between complete custom code and a full-blown API like CIFtbx, I can't say. Regards, John Bollinger Indiana University Molecular Structure Center
Reply to: [list | sender only]
- Prev by Date: RE: parser validation tools
- Next by Date: Re: parser validation tools
- Prev by thread: RE: parser validation tools
- Next by thread: Re: parser validation tools
- Index(es):