BSD Ports

devel/ocaml-menhir 20240715 OpenBSD

OCaml parser generator for LR(1) grammars

System
OpenBSD
Repository
OpenBSD ports
Maintainer
The OpenBSD ports mailing-list <[email protected]>
Categories
devel

Description

Menhir is a LR(1) parser generator for the OCaml programming language. That is, Menhir compiles LR(1) grammar specifications down to OCaml code. Menhir was designed and implemented by Francois Pottier and Yann Regis-Gianas.

Menhir is 90% compatible with ocamlyacc. Legacy ocamlyacc grammar specifications are accepted and compiled by Menhir. The resulting parsers run and produce correct parse trees. However, parsers that explicitly invoke functions in module Parsing behave slightly incorrectly. For instance, the functions that provide access to positions return a dummy position when invoked by a Menhir parser. Porting a grammar specification from ocamlyacc to Menhir requires replacing all calls to module Parsing with new Menhir-specific keywords.

Install

Binary package:

pkg_add ocaml-menhir

From the ports tree:

cd /usr/ports/devel/ocaml-menhir && make install

Dependency graph

Ports that need it on the left, what it needs to run on the right; at most 8 of each. "Dependencies" below lists them all.

Dependencies

Build dependencies 3
Run dependencies 2
Required by 1