module Transform: sig
.. end
val string_to_item : unit -> (string, Biocaml_lines.item) Biocaml_transform.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 ->
(Biocaml_lines.item,
(Biocaml_lines.item * Biocaml_lines.item, [> `premature_end_of_input ])
Core.Std.Result.t)
Biocaml_transform.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 -> (Biocaml_lines.item, string) Biocaml_transform.t
val make : ?name:string ->
?filename:string ->
next:(Biocaml_lines.Buffer.t ->
[ `not_ready | `output of ('b, 'errnext) Core.Result.t ]) ->
on_error:([ `incomplete_input of
Biocaml_pos.t * Biocaml_lines.item list * string option
| `next of 'errnext ] -> 'err) ->
unit -> (string, ('b, 'err) Core.Result.t) Biocaml_transform.t
Build a stoppable line-oriented parsing_buffer.
val make_merge_error : ?name:string ->
?filename:string ->
next:(Biocaml_lines.Buffer.t ->
[ `not_ready
| `output of
('a,
[> `incomplete_input of
Biocaml_pos.t * Biocaml_lines.item list * string option ]
as 'b)
Core.Result.t ]) ->
unit -> (string, ('a, 'b) Core.Result.t) Biocaml_transform.t
Do like make
but merge `incomplete_input _
with the
errors of ~next
(which must be polymorphic variants).