menhir
« Back to VersTracker
Description:
LR(1) parser generator for the OCaml programming language
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: parser-generator ocaml compiler lr1 development
Install: brew install menhir
About:
Menhir is an LR(1) parser generator for OCaml. It generates efficient, deterministic parsers from high-level grammar specifications, offering both a parser and an LR(1) automaton analysis tool. It is designed to produce parsers that are fast and integrate seamlessly with OCaml code.
Key Features:
  • Generates efficient, deterministic LR(1) parsers
  • Integrates seamlessly with OCaml build systems
  • Provides detailed analysis of grammar conflicts
  • Supports both LR(1) and LALR(1) modes
Use Cases:
  • Building parsers for custom domain-specific languages (DSLs)
  • Implementing compilers and interpreters in OCaml
  • Parsing complex configuration or data formats
Alternatives:
  • ocamllex/ocamlyacc – Standard OCaml tools; ocamlyacc is LALR(1) and less powerful, while ocamllex handles lexical analysis.
  • ANTLR – A more general parser generator supporting multiple target languages, but not OCaml-native.
Version History
Detected Version Rev Change Commit
Sep 15, 2025 12:48am 0 VERSION_BUMP 07bc2bd6
Sep 12, 2025 2:17pm 0 VERSION_BUMP 2d0cbc46
Sep 14, 2024 2:54am 0 VERSION_BUMP 8ac635a0