On Jul 1, 2009, at 4:41 PM, Etienne Philip Pretorius wrote:
>
> More detail:
> I am storing data from the network in a boost::array and I have
> written
> a forward iterator to decode via dereferencing each utf8 byte sequence
> into its unicode code point. Should I build up the passed content into
> another buffer so that spirit could parse from "<"....">" or could I
> pass the original boost array that will contain the "<" and then later
> another parse call to get the ">" in the next iteration of the network
> loop. Will spirit then recognize the start tag over the buffer break?
Spirit has no input buffer of its own. Spirit is not designed to do
'stop and go' parsing.
That is parse an arbitrary,but not known to the parser,amount of
tokens of data, save state , quit, and later restart where it left off.
I suppose on_error<retry>(...) could be used to write an infinite
wait loop and continue parsing after more data is available, but mean
while it is parsing and failing possibly eating cpu time and
preventing more input, depends on os... provided you can provide a
real end of info indicator so that the on_error handler could be sure
whether it has found the real eoi or just a stop point. HAVE NOT
TRIED THIS....
------------------------------------------------------------------------------
_______________________________________________
Spirit-general mailing list
Spirit-general@...
https://lists.sourceforge.net/lists/listinfo/spirit-general