[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XML file formats .... was: Re: gEDA-user: Some footprints I triedto create
On Mar 14, 2007, at 4:59 PM, Stuart Brorson wrote:
> * One purported benefit for XML files is that there are lots of
> open-source parsers for them available, making integration into
> libgeda trivial. That's the theory, but in reality the job
> of a parser is to parse the input, and then stick it into
> datastructures suitable for use with the rest of gschem's code. An
> open-source parser does about 1/3 of the job we need (i.e. reading the
> file & creating some kind of parse tree). The rest of the job
> involves putting the stuff in the parse tree into libgeda's data
> structures. That's lots of work. Therefore, the purported advantage
> of the freely-available XML parser is a chimera. Yes, it may be of
> interest for a new program written from the ground up, but not for an
> existing program like gEDA.
This is a very real point, and one that I can speak to from
experience. A few years ago, I converted a big-ish commercial
software product that I wrote from using a homebrew config file
parsing system (its config files are large) using lex/yacc and a
custom format to using XML with libxml2. Now I no longer have to
worry about fiddling with the lexer or the parser when I need to add
something, but it was a LOT of work to sprinkle the libxml2-parsed
data into my code's internal data structures.
In the end, while admittedly it's nice to not have to fiddle with
the lexer/parser code anymore when I add things to the file format,
I'm not sure if it was actually worth the effort. If I'd had a
better idea of the amount of effort it required beforehand, I likely
would not have done it.
-Dave
--
Dave McGuire
Port Charlotte, FL
_______________________________________________
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user