Streaming parsers in D a novel design

Steven Schveighoffer schveiguy at gmail.com
Tue Apr 18 21:16:51 UTC 2023


On 4/18/23 7:24 AM, H. S. Teoh wrote:

> At the end of the day, I think treating a parser as a transformation
> (range of char -> range of tokens) is a better abstraction than trying
> to shoehorn it into something involved output ranges.

This is exactly how jsoniopipe works (though the input is not a "range" 
but an iopipe of course).

The resulting thing is essentially a "range", but not with the range 
functions. The implementation doesn't quite fit the range paradigm.

https://github.com/schveiguy/jsoniopipe

-Steve


More information about the Digitalmars-d mailing list