|
Boost : |
From: Marcin Kalicinski (kalita_at_[hidden])
Date: 2006-04-22 07:22:41
> The design appears to be appears to be adequate
> at first, but the more time
> I spent with working through the examples, the less I liked it.
Please could you state specific things you didn't like.
> I think the implementation is pretty good. Overall, the
> author(s) have utilized
> modern c++ and established boost's "best-practices",
> including using boost::spirit for the "xml" parser.
> I'm not sure why he didn't use boost::spirit or
> boost::xpressive for the
> other parsers though.
Here's the current implementation status of various parsers:
XML - Spirit
JSON - Spirit
INI - not using Spirit
INFO - not using Spirit
Registry - irrelevant
Cmdline - irrelevant
The reason I didn't use Spirit to parse INI file is its simplicty. If you
look in ini_parser.hpp, read function fits on one screen. This will not be
considerably simpler with Spirit, it might even be longer if you consider
that you'll need to define grammar, function objects for actions. I agree it
would be more maintainable with Spirit.
INFO file is another story, I implemented first parsers for it long time
ago, even before I started using boost. I once rewrote in it Spirit, but
that - for some reason (maybe my incompetence at that time) - made parser
significantly slower. So I returned to original version. Because it works
fine as it is now, I see little reason to rewrite it. For those who may be
interested, in examples dir there is an example which implements INFO with
Spirit. It is intended to be a grammar specification (a nice side effect of
Spirit is that it is a compilable and runnable grammar specification :-)
> * What is your evaluation of the documentation?
>
> Inadequate, at least compared to the better documented boost libraries.
> More work is need here.
Please specify what would you like expanded/added. I'm already aware that
there is precious little docs on customization/traits part of the library.
Best regards,
Marcin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk