Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
POTTIER Francois
menhir
Commits
0ddb894b
Commit
0ddb894b
authored
Sep 23, 2015
by
POTTIER Francois
Browse files
Added [--compile-errors] as a new command line option.
parent
aafaa2c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/settings.ml
View file @
0ddb894b
...
...
@@ -174,10 +174,17 @@ let ignore_all_unused_tokens =
let
list_errors
=
ref
false
let
compile_errors
=
ref
None
let
set_compile_errors
filename
=
compile_errors
:=
Some
filename
let
options
=
Arg
.
align
[
"--base"
,
Arg
.
Set_string
base
,
"<basename> Specifies a base name for the output file(s)"
;
"--canonical"
,
Arg
.
Unit
(
fun
()
->
construction_mode
:=
ModeCanonical
)
,
" Construct a canonical Knuth LR(1) automaton"
;
"--comment"
,
Arg
.
Set
comment
,
" Include comments in the generated code"
;
"--compile-errors"
,
Arg
.
String
set_compile_errors
,
"<filename> Map the error messages in <filename> to OCaml code."
;
"--coq"
,
Arg
.
Set
coq
,
" Generate a formally verified parser, in Coq"
;
"--coq-no-complete"
,
Arg
.
Set
coq_no_complete
,
" Do not generate a proof of completeness"
;
"--coq-no-actions"
,
Arg
.
Set
coq_no_actions
,
" Ignore semantic actions in the Coq output"
;
...
...
@@ -419,3 +426,6 @@ let ignore_all_unused_tokens =
let
list_errors
=
!
list_errors
let
compile_errors
=
!
compile_errors
src/settings.mli
View file @
0ddb894b
...
...
@@ -184,3 +184,9 @@ val ignore_all_unused_tokens: bool
where an error can occur. *)
val
list_errors
:
bool
(* This flag causes Menhir to read the error message descriptions stored in
[filename] and compile them to OCaml code. *)
val
compile_errors
:
string
option
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment