aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/coqdep_lexer.mll
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-09-17 14:12:50 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-09-17 14:12:50 +0000
commit7bc7fc79e719202c84e7c60f1f4ab42f5e9bcf8f (patch)
tree1e3996204eea985915969ea425fdb7ca30bc5311 /tools/coqdep_lexer.mll
parent3111aa5721db71d0d4bb2f9717d61723f76bf97e (diff)
Coqdep_boot : misc improvements
- modules names can include quote ' - errors when parsing .mllib files are now properly reported instead of dying ugly on some sort of Failure - same when coqdep has to parse the output of ocamldep -modules - lib/lib.mllib contains a typo (lowercase ident) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13423 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tools/coqdep_lexer.mll')
-rw-r--r--tools/coqdep_lexer.mll6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/coqdep_lexer.mll b/tools/coqdep_lexer.mll
index 0e7467eb0..09433ff76 100644
--- a/tools/coqdep_lexer.mll
+++ b/tools/coqdep_lexer.mll
@@ -24,6 +24,7 @@
let comment_depth = ref 0
exception Fin_fichier
+ exception Syntax_error of int*int
let module_current_name = ref []
let module_names = ref []
@@ -221,12 +222,13 @@ and qual_id = parse
| _ { caml_action lexbuf }
and mllib_list = parse
- | coq_ident { let s = String.uncapitalize (Lexing.lexeme lexbuf)
+ | caml_up_ident { let s = String.uncapitalize (Lexing.lexeme lexbuf)
in s :: mllib_list lexbuf }
| "*predef*" { mllib_list lexbuf }
| space+ { mllib_list lexbuf }
| eof { [] }
+ | _ { raise (Syntax_error (Lexing.lexeme_start lexbuf,
+ Lexing.lexeme_end lexbuf)) }
and ocamldep_parse = parse
| [^ ':' ]* ':' { mllib_list lexbuf }
- | _ { [] }