petitparser2
petitparser2 copied to clipboard
How to use it consuming input from a stream?
This is possibly related with https://github.com/kursjan/petitparser2/issues/55
I want to parse a big CSV file line by line, and I hoped it was something like:
aCSVStream := 'myFile.csv' asFileReference readStream.
ZnBufferedReadStream
on: aCSVStream
do: [ :stream | (PP2CommaSeparatedParser parse: stream) row ]
But it didn't worked and isn't entirely clear to me what could be a way to parse input from a stream. Is this possible right now?
Any suggestion to this? Maybe @kursjan ?