1MENHIR(1)                   General Commands Manual                  MENHIR(1)
2
3
4

NAME

6       menhir - an LR(1) parser generator for OCaml
7
8

SYNOPSIS

10       menhir [options] files
11

DESCRIPTION

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

OPTIONS

19       -h, --help
20              Show summary of options.
21
22       -b, --base basename
23              Specifies a base name for the output file(s).
24
25       --canonical
26              Construct a canonical Knuth LR(1) automaton.
27
28       --cmly Write the grammar and automaton to basename.cmly.
29
30       --comment
31              Include comments in the generated code.
32
33       --compare-errors file1 --compare-errors file2
34              Compare two .messages files.
35
36       --compile-errors file
37              Compile a .messages file to OCaml code.
38
39       --coq  Generate a formally verified parser, in Coq.
40
41       --coq-lib-path path
42              How to qualify references to MenhirLib.
43
44       --coq-lib-no-path
45              Do not qualify references to MenhirLib.
46
47       --coq-no-actions
48              Ignore semantic actions in the Coq output.
49
50       --coq-no-complete
51              Do not generate a proof of completeness.
52
53       --depend
54              Invoke ocamldep and display dependencies.
55
56       --dump Describe the automaton in basename.automaton.
57
58       --echo-errors file
59              Echo the sentences in a .messages file.
60
61       --explain
62              Explain conflicts in basename.conflicts.
63
64       --external-tokens module
65              Import token type definition from module.
66
67       --fixed-exception
68              Declares Error = Parsing.Parse_error.
69
70       --graph
71              Write grammar's dependency graph to basename.dot.
72
73       --infer
74              Invoke ocamlc for ahead of time type inference.
75
76       --infer-protocol-supported
77              Stop with exit code 0.
78
79       --infer-write-query file
80              Write mock .ml file.
81
82       --infer-read-reply file
83              Read inferred .mli file.
84
85       --inspection
86              Generate the inspection API.
87
88       --interpret
89              Interpret the sentences provided on stdin.
90
91       --interpret-show-cst
92              Show a concrete syntax tree upon acceptance.
93
94       --interpret-error
95              Interpret an error sentence provided on stdin.
96
97       --lalr Construct an LALR(1) automaton.
98
99       -la, --log-automaton level
100              Log information about the automaton.
101
102       -lc, --log-code level
103              Log information about the generated code.
104
105       -lg, --log-grammar level
106              Log information about the grammar.
107
108       --list-errors
109              Produce a list of erroneous inputs.
110
111       --no-inline
112              Ignore the %inline keyword.
113
114       --no-stdlib
115              Do not load the standard library.
116
117       --ocamlc command
118              Specifies how ocamlc should be invoked.
119
120       --ocamldep command
121              Specifies how ocamldep should be invoked.
122
123       --only-preprocess
124              Print a simplified grammar and exit.
125
126       --only-preprocess-for-ocamlyacc
127              Print grammar in ocamlyacc format and exit.
128
129       --only-preprocess-u
130              Print grammar with unit actions and exit.
131
132       --only-preprocess-uu
133              Print grammar with unit actions and tokens and exit.
134
135       --only-tokens
136              Generate token type definition only, no code.
137
138       --raw-depend
139              Invoke ocamldep and echo its raw output.
140
141       --stdlib directory
142              Specify where the standard library lies.
143
144       --strict
145              Warnings about the grammar are errors.
146
147       --suggest-comp-flags
148              Suggest compilation flags for ocaml{c,opt}.
149
150       --suggest-link-flags-byte
151              Suggest link flags for ocamlc.
152
153       --suggest-link-flags-opt
154              Suggest link flags for ocamlopt.
155
156       --suggest-menhirLib
157              Suggest where MenhirLib was installed in source form.
158
159       --suggest-ocamlfind
160              Show if Menhir was installed using ocamlfind.
161
162       -t, --table
163              Use the table-based back-end.
164
165       --timings
166              Display internal timings.
167
168       --trace
169              Include tracing instructions in the generated code.
170
171       --unused-precedence-levels
172              Do not warn about unused precedence levels.
173
174       --unused-token token
175              Do not warn that token is unused.
176
177       --unused-tokens
178              Do not warn about any unused token.
179
180       --update-errors file
181              Update auto-comments in a .messages file.
182
183       --version
184              Show version number and exit.
185
186       -v     Synonymous with --dump --explain.
187
188
189

SEE ALSO

191       ocaml(1).
192
193
194

AUTHOR

196       menhir was written by François Pottier and Yann Régis-Gianas.
197
198       This  manual  page  was  originally  written  by  Samuel  Mimram <smim‐
199       ram@debian.org> for the Debian project (but may be used by others).
200
201
202
203                                 July 03, 2018                       MENHIR(1)
Impressum