|
Boost : |
From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2006-10-31 14:08:58
loufoque wrote:
> Stefan Seefeld wrote:
>
>> What about an interface similar to SAX, where the user provides a set
>> of handlers, one per type, and then the reader calls the appropriate
>> one ?
>
> This is a discussion about the interface for a Pull parser.
> You're talking about a Push one.
No I'm not; at least, I don't think I am. :-)
The user still has control over how the reader advances from one token
to the next, since it is the user who calls 'next()' (or however it will
be spelled). A push parser would be one where you call a single 'run'
method and then the parser dispatches tokens (embedded into events).
I don't think the fact that my design involves a dispatch qualifies it
as push. Compare this to a visitor to resolve the token's type.
Regards,
Stefan
-- ...ich hab' noch einen Koffer in Berlin...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk