petitparser2 icon indicating copy to clipboard operation
petitparser2 copied to clipboard

How to use it consuming input from a stream?

Open hernanmd opened this issue 1 year ago • 1 comments

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?

hernanmd avatar Sep 27 '23 19:09 hernanmd

Any suggestion to this? Maybe @kursjan ?

hernanmd avatar Nov 20 '23 16:11 hernanmd