package delimited_parsing

  1. Overview
  2. Docs

Source file delimited.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
(** Read CSVs & CSV-like delimited formats (following the CSV quoting behaviour).

    These formats are loosely documented by RFC 4180: https://www.ietf.org/rfc/rfc4180.txt
*)
module Read = Read

(** Write CSVs & CSV-like delimited formats. *)
module Write = struct
  include Write

  (** Helper for converting from the old interface. Use this snippet in files
      to disable the expert interface:

      {[
        module Delimited = struct
          include Delimited
          module Write = Delimited.Write.Without_expert
        end
      ]}
  *)
  module Without_expert : module type of Write with module Expert := Write.Expert = Write
end

(** Parsers for non-CSV-like formats *)
module Non_csv = struct
  (** [Character_separated_without_quoting] parses fields separated by a character, where
      fields may contain escaped characters (e,g, [\n]) but fields may not be quoted (e.g.,
      ["foo bar"]). *)
  module Character_separated_without_quoting = Character_separated_without_quoting

  (** [Positional] parses fixed-width fields. *)
  module Positional = Positional
end


(** {1} Modules shared between multiple parsers. *)
module Shared = Shared
OCaml

Innovation. Community. Security.