DOKK / manpages / debian 10 / menhir / menhir.1.en
MENHIR(1) General Commands Manual MENHIR(1)

menhir - an LR(1) parser generator for OCaml

menhir [options] files

menhir is an LR(1) parser generator for the OCaml programming language. That is, Menhir compiles LR(1) grammar specifications down to OCaml code. It is mostly compatible with ocamlyacc(1).

Show summary of options.
Specifies a base name for the output file(s).
Construct a canonical Knuth LR(1) automaton.
Write the grammar and automaton to basename.cmly.
Include comments in the generated code.
Compare two .messages files.
Compile a .messages file to OCaml code.
Generate a formally verified parser, in Coq.
--coq-lib-path path
How to qualify references to MenhirLib.
--coq-lib-no-path
Do not qualify references to MenhirLib.
--coq-no-actions
Ignore semantic actions in the Coq output.
--coq-no-complete
Do not generate a proof of completeness.
Invoke ocamldep and display dependencies.
Describe the automaton in basename.automaton.
Echo the sentences in a .messages file.
Explain conflicts in basename.conflicts.
Import token type definition from module.
Declares Error = Parsing.Parse_error.
Write grammar's dependency graph to basename.dot.
Invoke ocamlc for ahead of time type inference.
--infer-protocol-supported
Stop with exit code 0.
--infer-write-query file
Write mock .ml file.
--infer-read-reply file
Read inferred .mli file.
Generate the inspection API.
Interpret the sentences provided on stdin.
--interpret-show-cst
Show a concrete syntax tree upon acceptance.
--interpret-error
Interpret an error sentence provided on stdin.
Construct an LALR(1) automaton.
Log information about the automaton.
Log information about the generated code.
Log information about the grammar.
Produce a list of erroneous inputs.
Disallow the use of $i notation.
Ignore the %inline keyword.
Do not load the standard library.
Specifies how ocamlc should be invoked.
Specifies how ocamldep should be invoked.
Print a simplified grammar and exit.
Print grammar in ocamlyacc format and exit.
Print grammar with unit actions and exit.
Print grammar with unit actions and tokens and exit.
Generate token type definition only, no code.
Invoke ocamldep and echo its raw output.
Specify where the standard library lies.
Warnings about the grammar are errors.
Suggest compilation flags for ocaml{c,opt}.
Suggest link flags for ocamlc.
Suggest link flags for ocamlopt.
Suggest where MenhirLib was installed in source form.
Show if Menhir was installed using ocamlfind.
Use the table-based back-end.
Display internal timings.
Include tracing instructions in the generated code.
Do not warn about unused precedence levels.
Do not warn that token is unused.
Do not warn about any unused token.
Update auto-comments in a .messages file.
Show version number and exit.
Synonymous with --dump --explain.

ocaml(1).

menhir was written by François Pottier and Yann Régis-Gianas.

This manual page was originally written by Samuel Mimram <smimram@debian.org> for the Debian project (but may be used by others).

July 3, 2018