From: Bjorn Reese (breese_at_[hidden])
Date: 2019-09-30 16:23:01
On 9/30/19 12:14 PM, julien.blanc_at_tgcm.eu wrote:
> Do you have an example of an efficient implementation of a pull parser on top of async io ? I find push parsers really more straightforward in that case.
Vinicius has an HTTP pull parser here:
> Pull parsers can also be built on top of push parsers, although it is less easy.
Indeed, that is how we implemented XmlTextReader in libxml2, and it
was a rather painful experience.
Coroutines can help, as Phil pointed out, but pull parser are also a
natural fit for parser combinators (e.g. HTTP contains a partial URL
syntax, so it could be created combining HTTP and URL pull parsers.)
I am not sure how well coroutines would handle this case.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk