signature STREAM = sig type fileId = int type fileOffset = int type pos = fileId * fileOffset type convPos = string * int * int option type filesInfo = (fileId * string * string) list exception EndOfStream exception EndOfFile exception LineWithoutNl type t val extractFilesInfo: t -> filesInfo val pos2str: convPos -> string val printPos: (fileId * string * string) list -> pos -> unit val getchar: t -> char * t val ungetc: t -> t val readline: t -> string * t val getOffset: t -> fileOffset val getPos: t -> pos val getPosAfterCharRead: t -> pos val getPposFromPos: pos -> t -> convPos val getSubstr: fileOffset -> fileOffset -> t -> string val isFirstOnLine: pos -> t -> bool val advanceToNewFile: t -> t val streamInit: string -> t end