
I'm posting an early version of a library for manipulating hierarchical data structures, for example the parse trees that are produced by Spirit2. The library enables traversals, and local modifications of complex data structures, without the need to implement large amounts of repetitive traversal code. The library is in a very early state, but has a pretty large introduction and quick start guide, which (hopefully) will help get people started with the library. Formal documentation is unfortunately non-existent at this point.
The library is based on techniques from the Haskell community, links to relevant papers are provided in the documentation.
The library is intended to play well with the rest of Boost, it already contains support for structures built with Boost.Optional and Boost.Variant, and Boost.Fusion, and will support other Boost libraries in future releases. The library makes heavy use of function objects, and is intended to work with Boost.Lambda, Phoenix, and other function object libraries in Boost.
I second the expressed opinion that this library is a very important piece of work and I'm looking forward to having it available. IIUC, the traversal library is designed to help traversing arbitrary data structures and to apply local _value_ changes. My question is: Is the used concept extensible in a way allowing for _structural_ changes of the traversed data structure? This would make it usable for tree transformations, which would be especially interesting if used with Spirit.Qi (parsing) and Spirit.Karma (generation). Regards Hartmut