camlp-streams package provides two library modules:
Stream: imperative streams, with in-place update and memoization of the latest element produced.
Genlex: a small parameterized lexical analyzer producing streams of tokens from streams of characters.
The stream patterns and stream expressions of Camlp4/Camlp5 consume and produce data of type
Genlextokenizer can be used as a simple lexical analyzer for Camlp4/Camlp5-generated parsers.
Stream module can also be used by hand-written recursive-descent parsers, but is not very convenient for this purpose.
Genlex modules have been part of the OCaml standard library for a long time, and have been distributed as part of the core OCaml system. They will be removed from the OCaml standard library at some future point, but will be maintained and distributed separately in this