package biocaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Transforms from/to Lines.item.

val string_to_item : unit -> (string, item) Biocaml_unix.Tfxm.t

Return a transform that converts a stream of arbitrary strings to a stream of lines. If the input terminates without a newline, the trailing string is still considered a line.

val group2 : unit -> (item, (item * item, [> `premature_end_of_input ]) Pervasives.result) Biocaml_unix.Tfxm.t

Return a transform that converts a stream of lines to a stream of pairs of lines. It is considered an error if input ends with an odd number of lines.

val item_to_string : ?buffer:[ `clear of int | `reset of int ] -> unit -> (item, string) Biocaml_unix.Tfxm.t

Return a transform that output Line.items to strings (in other words a buffer with the lines plus their end-of-line character).

val make : ?name:string -> ?filename:string -> next: (Buffer.t -> [ `not_ready | `output of ('b, 'errnext) Pervasives.result ]) -> on_error: ([ `next of 'errnext | `incomplete_input of Biocaml_unix.Pos.t * string list * string option ] -> 'err) -> unit -> (string, ('b, 'err) Pervasives.result) Biocaml_unix.Tfxm.t

Build a stoppable line-oriented parsing_buffer.

val make_merge_error : ?name:string -> ?filename:string -> next: (Buffer.t -> [ `not_ready | `output of ('a, [> `incomplete_input of Biocaml_unix.Pos.t * string list * string option ] as 'b) Pervasives.result ]) -> unit -> (string, ('a, 'b) Pervasives.result) Biocaml_unix.Tfxm.t

Do like make but merge `incomplete_input _ with the errors of ~next (which must be polymorphic variants).

OCaml

Innovation. Community. Security.