Module Cps_reader


module Cps_reader: sig .. end
This defines the interface for the "reader" objects that the parser expects, as well as a few implementations thereof. Typically, these objects will take data from some normal source, like a string, file, or socket, and feed them to the parser.

The reader methods are invoked through continuation-passing style. This means that instead of being expected to return a value to its caller, it is passed a "continuation" (a procedure) to which it should pass the result in a tail-call.


class type t = object .. end
The basic reader interface.
val make_string_reader : string -> t
Creates a reader from the given ASCII string.
val make_utf8_string_reader : string -> t
Creates a reader from the given UTF-8 string.
Raises Utf8_char.Bad_encoding if an invalid UTF-8 encoding is encountered.
val make_utf8_file_reader : string -> t
Creates a reader from a UTF-8 file given the filename.
Raises