Coccinelle release 1.0.0-rc13
[bpt/coccinelle.git] / bundles / menhirLib / menhir-20120123 / src / settings.mli
1 (**************************************************************************)
2 (* *)
3 (* Menhir *)
4 (* *)
5 (* François Pottier, INRIA Rocquencourt *)
6 (* Yann Régis-Gianas, PPS, Université Paris Diderot *)
7 (* *)
8 (* Copyright 2005-2008 Institut National de Recherche en Informatique *)
9 (* et en Automatique. All rights reserved. This file is distributed *)
10 (* under the terms of the Q Public License version 1.0, with the change *)
11 (* described in file LICENSE. *)
12 (* *)
13 (**************************************************************************)
14
15 (* This module parses the command line. *)
16
17 (* The list of file names that appear on the command line. *)
18
19 val filenames: string list
20
21 (* How to deal with the type of tokens. *)
22
23 type token_type_mode =
24 | TokenTypeAndCode (* produce the definition of the [token] type and code for the parser *)
25 | TokenTypeOnly (* produce the type definition only *)
26 | CodeOnly of string (* produce the code only, by relying on an external token type *)
27
28 val token_type_mode: token_type_mode
29
30 (* Whether Pager's algorithm should be used. *)
31
32 val pager: bool
33
34 (* Whether conflicts should be explained. *)
35
36 val explain: bool
37
38 (* Whether the automaton should be dumped. *)
39
40 val dump: bool
41
42 (* Whether the automaton's construction should be explained (very verbose). *)
43
44 val follow: bool
45
46 (* Whether the grammar's dependence graph should be dumped. *)
47
48 val graph: bool
49
50 (* Whether tracing instructions should be generated. *)
51
52 val trace: bool
53
54 (* Whether error recovery should be attempted. This consists
55 in discarding tokens, after the [error] token has been
56 shifted, until a token that can be accepted is found. *)
57
58 val recovery: bool
59
60 (* Whether one should stop and print the grammar after joining and
61 expanding the grammar. *)
62
63 type print_mode =
64 | PrintNormal
65 | PrintUnitActions
66 | PrintUnitActionsUnitTokens
67
68 type preprocess_mode =
69 | PMNormal (* preprocess and continue *)
70 | PMOnlyPreprocess of print_mode (* preprocess, print grammar, stop *)
71
72 val preprocess_mode: preprocess_mode
73
74 (* Whether one should invoke ocamlc in order to infer types for all
75 nonterminals. *)
76
77 val infer: bool
78
79 (* Whether one should inline the non terminal definitions marked
80 with the %inline keyword. *)
81
82 val inline: bool
83
84 (* Whether and how one should invoke ocamldep in order to compute and
85 display dependencies. *)
86
87 type ocamldep_mode =
88 | OMNone (* do not invoke ocamldep *)
89 | OMRaw (* invoke ocamldep and echo its raw output *)
90 | OMPostprocess (* invoke ocamldep and postprocess its output *)
91
92 val depend: ocamldep_mode
93
94 (* Whether comments should be printed or discarded. *)
95
96 val comment: bool
97
98 (* This undocumented flag suppresses prefixing of identifiers with an
99 unlikely prefix in the generated code. This increases the code's
100 readability, but can cause identifiers in semantic actions to be
101 captured. *)
102
103 val noprefix: bool
104
105 (* This undocumented flag causes the code to be transformed by
106 [Inline]. It is on by default. *)
107
108 val code_inlining: bool
109
110 (* How [ocamlc] and [ocamldep] should be invoked. *)
111
112 val ocamlc: string
113 val ocamldep: string
114
115 (* How verbose we should be. *)
116
117 val logG: int (* diagnostics on the grammar *)
118 val logA: int (* diagnostics on the automaton *)
119 val logC: int (* diagnostics on the generated code *)
120
121 (* Whether tasks should be timed. *)
122
123 val timings: bool
124
125 (* The base name that should be used for the files that we create.
126 This name can contain a path. *)
127
128 val base: string
129
130 (* The filename of the standard library. *)
131
132 val stdlib_filename : string
133
134 (* Whether Menhir should behave as an interpreter. *)
135
136 val interpret : bool
137
138 (* Whether the interpreter should build and display concrete syntax trees. *)
139
140 val interpret_show_cst : bool
141
142 (* Whether to use the table-based back-end ([true]) or the code-based
143 back-end ([false]). *)
144
145 val table : bool
146
147 (* Whether to generate a coq description of the grammar and automaton. *)
148
149 val coq : bool
150
151 (* Whether the coq description must contain completeness proofs. *)
152
153 val coq_no_complete : bool
154
155 (* Whether the coq backend should ignore types and semantic actions. *)
156
157 val coq_no_actions : bool
158
159 (* Whether unresolved LR(1) conflicts, useless precedence declarations,
160 productions that are never reduced, etc. should be treated as errors. *)
161
162 val strict: bool
163