Boost logo

Boost :

Subject: Re: [boost] Potential Boost SAX library
From: Vinícius dos Santos Oliveira (vini.ipsmaker_at_[hidden])
Date: 2018-01-13 16:09:07

2018-01-13 10:00 GMT-03:00 Oliver Adams via Boost <boost_at_[hidden]>:

> > * Pull parsers are composable. For instance, you could insert a URL
> > pull parser directly into an HTTP pull parser.
> Composability is a big issue with push parsers, so removing obstacles to
> that would greatly simplify some things. For certain types of information,
> though, it doesn't seem like composition is important.

Composability is not always important. I've written a HTTP pull parser[1],
but you won't always use the power to compose abstractions.

However, it's really impressive what you can do with pull parsers. For
instance, HTTP is the type of format where you parse incomplete messages.
The idea of reparsing from the beginning is not really feasible because you
usually won't maintain past data. Given these conditions, look at how
powerful an HTTP pull parser is, where you can copy the parser and use it
to "look ahead" (or backtracking if you will). I've wrote an example where
I compose the parser and you can kind of assume field names and field
values are always present together in the stream:

I don't really care about this specific example. I just like to notice how
powerful this style really is. If I am to advertise for one style or
another (and we're talking about HTTP parsers), I'll emphasize other


Vinícius dos Santos Oliveira

Boost list run by bdawes at, gregod at, cpdaniel at, john at