Em seg, 23 de set de 2019 às 12:58, Bjorn Reese via Boost < boost@lists.boost.org> escreveu:
As a former developer of one of said XML parsers, we learned the proper abstractions the hard way. If you start with a pull parser (what Vinnie refers to as an online parser, and what you refer to as an iterating parser), such as the XmlTextReader, then all the other interfaces flows naturally from that.
Another interesting property from pull parsers is that you can implement backtracking trivially as I've demonstrated in a branch for an HTTP parser: https://github.com/BoostGSoC14/boost.http/blob/83b83041de3e8b04cc9475497648f... Although I don't see much of use for backtracking in a JSON parser. But the composition of algorithms on the other side is fantastic. I've been using your JSON parser at work for some years now and the possibility to skip several tokens and delegate their processing to different functions works really well. -- Vinícius dos Santos Oliveira https://vinipsmaker.github.io/