On 07/06/2015 11:06 AM, Sebastian Redl wrote:
I just replaced the internal parser of PropertyTree (the old one was a Spirit.Classic parser) with a hand-written streaming parser (push, while yours appears to be pull) too. It's on the develop branch. The real
Yes, mine is a pull parser. Pull parsers are more versatile than push parsers, and therefore better suited as building-blocks. For instance, it is trivial to create a push parser with a pull parser. It is just a loop and switch as can be seen in this example: https://github.com/breese/protocol/blob/master/example/json/push_parser/push... Try creating a push parser with a pull parser ;-) It is also fairly easy to create Boost.Serialization archives with pull parsers.
problem is a sensible way to mark a tree as partial. Who wants to work with such a structure? In such cases, I'm pretty sure it would be simpler to use the streaming interface directly.
Agreed.