Boost logo

Boost :

From: Vinícius dos Santos Oliveira (vini.ipsmaker_at_[hidden])
Date: 2019-09-23 21:39:03


Em seg, 23 de set de 2019 às 12:58, Bjorn Reese via Boost <
boost_at_[hidden]> 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/83b83041de3e8b04cc9475497648f19504d5ce43/include/boost/http/socket.ipp#L1816-L1866

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/

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