aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/ocamllibdep.mll
diff options
context:
space:
mode:
authorGravatar Matej Košík <matej.kosik@inria.fr>2017-05-30 13:54:09 +0200
committerGravatar Matej Košík <matej.kosik@inria.fr>2017-05-30 13:54:09 +0200
commit107d15ec6f4996ef13f9a65c7b3a9e9b70fb17ec (patch)
tree570520a941aee85dc080471cdd5ccfb342187fcb /tools/ocamllibdep.mll
parentfd36c0451c26e44b1b7e93299d3367ad2d35fee3 (diff)
make sure that "ocamllibdep" properly recognizes Ocaml modules that are all upper-case
At the moment, when one tries to add an Ocaml module to Coq code-base which is composed just from upper-cases letters, the compilation fails with an error: File "......ml", line 1: Error: Error while linking ... Reference to undefined global `FOO' This commit removes the restriction.
Diffstat (limited to 'tools/ocamllibdep.mll')
-rw-r--r--tools/ocamllibdep.mll2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/ocamllibdep.mll b/tools/ocamllibdep.mll
index f8b204c0b..5d11e3008 100644
--- a/tools/ocamllibdep.mll
+++ b/tools/ocamllibdep.mll
@@ -28,6 +28,8 @@ let caml_up_ident = uppercase identchar*
let caml_low_ident = lowercase identchar*
rule mllib_list = parse
+ | uppercase+ { let s = Lexing.lexeme lexbuf in
+ s :: mllib_list lexbuf }
| caml_up_ident { let s = uncapitalize (Lexing.lexeme lexbuf)
in s :: mllib_list lexbuf }
| "*predef*" { mllib_list lexbuf }