Camlp4

Camlp4 is a software system for writing extensible parsers for programming languages. It provides a set of OCaml libraries that are used to define grammars as well as loadable syntax extensions of such grammars. Camlp4 stands for Caml Preprocessor and Pretty-Printer and one of its most important applications was the definition of domain-specific extensions of the syntax of OCaml.

Camlp4 was part of the official OCaml distribution which is developed at the INRIA. Its original author is Daniel de Rauglaudre. OCaml version 3.10.0, released in May 2007, introduced a significantly modified and backward-incompatible version of Camlp4. De Rauglaudre maintains a separate backward-compatible version, which has been renamed Camlp5. All of the examples below are for Camlp5 or the previous version of Camlp4 (versions 3.09 and prior).

Version 4.08, released in the summer of 2019,[1] was the last official version of this library. It is currently deprecated; [2] instead, it is recommended to use the PPX (PreProcessor eXtensions)[3][4] libraries.[5]

  1. ^ "ocaml/camlp4". GitHub. Retrieved 2020-02-04.
  2. ^ Dimino, Jérémie (2019-08-07). "The end of Camlp4". OCaml. Archived from the original on 2020-02-04. Retrieved 2020-02-04.
  3. ^ "PPX". ocamllabs.io. Retrieved 2020-02-04.
  4. ^ Metzger, Perry. "A Guide to PreProcessor eXtensions". OCamlverse. Archived from the original on 2020-02-05. Retrieved 2020-02-05.
  5. ^ Dimino, Jeremie. "Converting a code base from camlp4 to ppx". Jane Street Tech Blog. Archived from the original on 2020-02-04. Retrieved 2020-02-04.