
5 Jul
2007
5 Jul
'07
2:28 p.m.
AC> For the Nth time... The amount of data processed by parser1 needs AC> to depend on the amount of data processed by parser2. (The amount AC> of data output by each parser is very nontrivially related to the AC> amount of data consumed.) What about lazyness? Let parser1 process ALL the data and return chunks of output paired with the amount of data read; then, parser2 have to return it's result paired with the amount of data read, known from parser1, allowing parser3 to know where to start. It doesn't matter that parser1 wouldn't recognize the rest of data, since it wouldn't be fed with it due to lazyness.