camlp5
« Back to VersTracker
Description:
Preprocessor and pretty-printer for OCaml
Type: Formula  |  Latest Version: 8.04.00@1  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: ocaml preprocessor metaprogramming parser dsl
Install: brew install camlp5
About:
Camlp5 is a comprehensive preprocessor and pretty-printer for OCaml, extending the language with advanced parsing and syntax manipulation capabilities. It enables the creation of custom syntax extensions and domain-specific languages (DSLs) within OCaml. Its primary value is in tooling and metaprogramming for the OCaml ecosystem.
Key Features:
  • Extensible grammar for defining new syntax
  • Powerful syntax tree transformers and quotations
  • Revised OCaml syntax (revised-ocaml) support
  • Compatibility with modern OCaml versions
Use Cases:
  • Creating custom DSLs and syntax extensions for OCaml
  • Building advanced code analysis and transformation tools
  • Preprocessing OCaml source files for specialized build pipelines
Alternatives:
  • ppx – PPX is the modern standard for OCaml metaprogramming; Camlp5 offers deeper control over the grammar and parser but has a steeper learning curve.
License: BSD-3-Clause
Dependencies: camlp-streams, ocaml, pcre2
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, sonoma, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Nov 3, 2025 6:29am 0 VERSION_BUMP 06ae9e0e
Sep 11, 2025 8:53am 1 VERSION_BUMP d1a62b4f
Oct 8, 2024 5:30am 0 VERSION_BUMP c21b6185