Boost logo

Boost :

Subject: Re: [boost] [serialization] feedback on a possible port of the XML archive grammar to Qi
From: Bryce Lelbach aka wash (admin_at_[hidden])
Date: 2010-09-08 23:43:33


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/01/2010 12:45 AM, Robert Ramey wrote:
> This get's my vote. Actually I don't think you'll have to modify
> anything other than xml_grammar.cpp.

So far, the only places I've had to make major changes are in
/boost/archive/impl/basic_xml_grammar.hpp and
/libs/serialization/src/basic_xml_grammar.ipp.

Once I get the basic rewrite finished and fully working, I might refactor how
the grammar is instantiated/called internally. ATM I'm leaving all uses of the
grammar class in Serialization untouched.

> There is caveat. I tweaked the xml_grammar.cpp to use a
> lower level entry point in the hopes of permitting xml_archives
> to be thread-safe. I believe that this was successful but I can't
> know for sure.

Maybe we could come up with a few use cases for thread-safety in xml_archives?
I'd be happy to implement a small test suite if you could give me some
parameters to work off of. Then you could verify the existing implementation and
earlier versions of Serialization, and I could ensure my rewrite performs as
desired in concurrent applications.

At this point I've ported about 90% of the grammar. I've also replaced your
assign/append functors (for Spirit Classic semantic actions) in
/boost/archive/impl/basic_xml_grammar.ipp with Phoenix lambda expressions.

The Classic XML parser has a number of workarounds in the grammar for template
depth issues on Darwin (GCC 3.1). These workarounds seem to be deprecated (circa
2004); Spirit Qi tends to instantiate deeper templates than Spirit Classic, and
more modern versions of Darwin GCC seem capable of handling Spirit Qi. I'd
appreciate it if you could let me know if I'm missing part of the picture in
regards to these workarounds (they're in the ctor for the grammar, in
/boost/archive/impl/basic_xml_grammar.ipp).

 - Bryce Lelbach
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyIV+UACgkQO/fqqIuE2t65HgCfSYTGFO0WXea6ll/M79f/XXsy
rmAAoIZ8iVvHtHB7rD1spz5+3Iqakt2/
=mBq/
-----END PGP SIGNATURE-----


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk