boost spirit for antlr for qif parse?

Bill Gribble grib@linuxdevel.com
20 Oct 2002 14:05:06 -0500


On Sun, 2002-10-20 at 14:28, Larry Evans wrote:
> After struggling with the qif-import files to find a fix for 95844,
> I thought using something like  the two software packages mentioned
> in the subject line would have made things a lot easier.
> Has the been any thought about using these?  

Antlr and all the related C parser tools are a terrible idea IMO.  

I haven't looked at gnucash code lately, sorry, but I can't imagine a
problem with the QIF code (if it still resembles what I originally
wrote) that this kind of parser would make better.  Especially since the
extent of the "grammar" you could define is "1 character of tag followed
by other stuff".  The interpretation of number and date fields, in
particular, is not only dependent on what has come before it in the
file, but also on what comes *after* it in the file, which is where most
parsers will just throw up their hands. 

I still think if someone would finish the conversion to the new
qif-io-core code that (at one time) was in CVS it would be a win all
around.  That code was much smarter about parsing, and much more
readable and modular. 

b.g.