From 300293c119981054c95182a90c829058530a6b6f Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Sun, 25 Dec 2011 13:19:42 +0100 Subject: Imported Upstream version 8.3.pl3 --- tools/coqdoc/alpha.ml | 4 ++-- tools/coqdoc/alpha.mli | 4 ++-- tools/coqdoc/cdglobals.ml | 20 ++++++++++++++++++-- tools/coqdoc/cpretty.mli | 4 ++-- tools/coqdoc/cpretty.mll | 10 ++++++---- tools/coqdoc/index.ml | 24 +++++++++++++----------- tools/coqdoc/index.mli | 4 ++-- tools/coqdoc/main.ml | 6 +++--- tools/coqdoc/output.ml | 5 +++-- tools/coqdoc/output.mli | 4 ++-- tools/coqdoc/tokens.ml | 2 +- tools/coqdoc/tokens.mli | 2 +- 12 files changed, 55 insertions(+), 34 deletions(-) (limited to 'tools/coqdoc') diff --git a/tools/coqdoc/alpha.ml b/tools/coqdoc/alpha.ml index 664ead9a..83bfa5ed 100644 --- a/tools/coqdoc/alpha.ml +++ b/tools/coqdoc/alpha.ml @@ -1,12 +1,12 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* - try - Scanf.sscanf s "R%d %s %s %s %s" - (fun loc lib_dp sp id ty -> - add_ref !cur_mod loc lib_dp sp id (type_of_string ty)) with _ -> ()) | _ -> - try Scanf.sscanf s "%s %d %s %s" - (fun ty loc sp id -> add_def loc (type_of_string ty) sp id) + try Scanf.sscanf s "not %d %s %s" + (fun loc sp id -> add_def loc loc (type_of_string "not") sp id) + with Scanf.Scan_failure _ -> + try Scanf.sscanf s "%s %d:%d %s %s" + (fun ty loc1 loc2 sp id -> + add_def loc1 loc2 (type_of_string ty) sp id) with Scanf.Scan_failure _ -> () + end done; assert false with End_of_file -> diff --git a/tools/coqdoc/index.mli b/tools/coqdoc/index.mli index 72cd7a9f..a009e9dc 100644 --- a/tools/coqdoc/index.mli +++ b/tools/coqdoc/index.mli @@ -1,12 +1,12 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* on 9 & 10 Mar 2004: * - handling of absolute filenames (function coq_module) @@ -135,7 +135,7 @@ let add_path dir name = (* turn A/B/C into A.B.C *) let rec name_of_path p name dirname suffix = - if p = dirname then String.concat "." (name::suffix) + if p = dirname then String.concat "." (if name = "" then suffix else (name::suffix)) else let subdir = Filename.dirname dirname in if subdir = dirname then raise Not_found diff --git a/tools/coqdoc/output.ml b/tools/coqdoc/output.ml index 4f9dd169..eefcfd11 100644 --- a/tools/coqdoc/output.ml +++ b/tools/coqdoc/output.ml @@ -1,13 +1,13 @@ (* -*- compile-command: "make -C ../.. bin/coqdoc" -*- *) (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(*