The concatenated stream trick

Suppose you have a parser that reads from a stream, but the stream is missing something. E.g. you have a function that reads a string from a stream, but while the function expects the next character to be a opening quote, the opening quote has already been read from the stream. The obvious solution is … Continue reading The concatenated stream trick