[Pkg-ocaml-maint-commits] [otags] 01/08: Imported Upstream version 4.00.1

Hendrik Tews hendrik-guest at alioth.debian.org
Fri Aug 30 21:13:36 UTC 2013


This is an automated email from the git hooks/post-receive script.

hendrik-guest pushed a commit to branch master
in repository otags.

commit 14c80b2cea2281cfadc85d9494497154968d3efc
Author: Hendrik Tews <hendrik at askra.de>
Date:   Thu Aug 15 10:04:43 2013 +0200

    Imported Upstream version 4.00.1
---
 ChangeLog                  |   30 +++++++++++++++++++++
 INSTALL                    |    6 ++---
 Makefile.in                |    2 +-
 add_quotation.ml           |    2 +-
 add_quotation.mli          |    2 +-
 camlp4_names.ml            |    2 +-
 camlp4_names.mli           |    2 +-
 conf.mli                   |    2 +-
 configure                  |   12 ++++-----
 doc/changes.html           |   15 ++++++++---
 doc/otags.1                |   38 +++++++++++++-------------
 doc/otags.html             |   63 ++++++++++++++++++++------------------------
 emacs.ml                   |    2 +-
 emacs.mli                  |    2 +-
 global.ml                  |    2 +-
 global.mli                 |    2 +-
 misc.ml                    |    2 +-
 misc.mli                   |    2 +-
 monitor_line_directive.ml  |    2 +-
 monitor_line_directive.mli |    2 +-
 otags.ml                   |   10 ++++---
 parser_factory.ml          |    2 +-
 parser_factory.mli         |    2 +-
 parser_hints.ml            |    2 +-
 parser_hints.mli           |    2 +-
 reparse.ml                 |    2 +-
 reparse.mli                |    2 +-
 source_channel.ml          |    2 +-
 source_channel.mli         |    2 +-
 tags.ml                    |   49 +++++++++++++++++++++++++++++++---
 tags.mli                   |    2 +-
 test/a.ml                  |   11 ++++++++
 test/d.ml                  |    2 +-
 test/test.TAGS             |   21 +++++++++------
 test/test.tags             |    5 ++++
 translate_location.ml      |    2 +-
 translate_location.mli     |    2 +-
 types.ml                   |    2 +-
 types.mli                  |    2 +-
 util/dump-camlp4.ml        |   12 ++++++++-
 vi.ml                      |    2 +-
 vi.mli                     |    2 +-
 42 files changed, 219 insertions(+), 113 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bf20b73..d629331 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+2012-12-05  Hendrik Tews  <tews at os.inf.tu-dresden.de>
+
+	* commit test data
+
+2012-12-05  Hendrik Tews <otags at askra.de>
+
+	* prepare doc/changes.html for release
+
+2012-12-05  Hendrik Tews  <tews at os.inf.tu-dresden.de>
+
+	* treat camlp4 ast magic number mismatch
+	* update man page, changes.html
+
+2012-12-05  Hendrik Tews  <tews at os.inf.tu-dresden.de>
+
+	* OCaml 4.00
+
+2012-09-17  Hendrik Tews  <tews at os.inf.tu-dresden.de>
+
+	* try OCaml 4.00 migration, but sexplib is not yet
+	available, 4.00 specific code is in comments
+
+2012-09-16  Hendrik Tews  <tews at os.inf.tu-dresden.de>
+
+	* complete pattern match for let patterns
+
+2012-05-23  Hendrik Tews <otags at askra.de>
+
+	* release version 3.12.5 on 2012-05-23 20:19:32 UTC
+
 2012-05-23  Hendrik Tews <otags at askra.de>
 
 	* prepare doc/changes.html for release
diff --git a/INSTALL b/INSTALL
index 12a4484..ed23c17 100644
--- a/INSTALL
+++ b/INSTALL
@@ -27,13 +27,13 @@
 
    The option --ocamllibdir sets the directory in which
    type-conf/pa_type_conv.cma and sexplib/pa_sexp_conv.cma can be
-   found if you have the installed and they cannot be found
+   found if you have them installed and they cannot be found
    automatically using ocamlfind.
 
    [If you want to know the details: The configure script checks for
     ocamlc and ocamlopt.opt. When the latter is found native compilation
-    is used. It further check wheter all of ocamldep, camlp4, camlp4of,
-    camlp4oof, camlp4orf, camlp4rf, camlp4rf, camlp4o and camlp4r and
+    is used. It further checks wheter all of ocamldep, camlp4, camlp4of,
+    camlp4oof, camlp4orf, camlp4rf, camlp4rf, camlp4o and camlp4r are
     installed and have the same version as ocamlc and ocamlopt.opt. The
     location of the camlp4 executables is hardwired in the executable
     (via conf.ml.in). The script uses "ocamlfind query" to determine the
diff --git a/Makefile.in b/Makefile.in
index a4125c0..691f147 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -19,7 +19,7 @@
 # along with "Otags reloaded". If not, see
 # <http://www.gnu.org/licenses/>.
 # 
-# $Id: Makefile.in,v 1.30 2012-05-22 13:46:45 tews Exp $
+# $Id: Makefile.in,v 1.30 2012/05/22 13:46:45 tews Exp $
 # 
 
 .PHONY: all
diff --git a/add_quotation.ml b/add_quotation.ml
index b9701f8..27e2aa6 100644
--- a/add_quotation.ml
+++ b/add_quotation.ml
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: add_quotation.ml,v 1.4 2012-01-14 21:31:38 tews Exp $
+ * $Id: add_quotation.ml,v 1.4 2012/01/14 21:31:38 tews Exp $
  * 
  * higher-order functor for adding quotations to some syntax module
  * 
diff --git a/add_quotation.mli b/add_quotation.mli
index e5487ed..236850c 100644
--- a/add_quotation.mli
+++ b/add_quotation.mli
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: add_quotation.mli,v 1.3 2012-01-14 21:31:38 tews Exp $
+ * $Id: add_quotation.mli,v 1.3 2012/01/14 21:31:38 tews Exp $
  * 
  * higher-order functor for adding quotations to some syntax module
  * 
diff --git a/camlp4_names.ml b/camlp4_names.ml
index 33f6c35..2608a58 100644
--- a/camlp4_names.ml
+++ b/camlp4_names.ml
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  *
- * $Id: camlp4_names.ml,v 1.12 2012-05-22 07:38:36 tews Exp $
+ * $Id: camlp4_names.ml,v 1.12 2012/05/22 07:38:36 tews Exp $
  *
  * names and aliases of camlp4 modules and executables
  *
diff --git a/camlp4_names.mli b/camlp4_names.mli
index 2b439e4..b902cac 100644
--- a/camlp4_names.mli
+++ b/camlp4_names.mli
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: camlp4_names.mli,v 1.6 2012-05-22 07:38:36 tews Exp $
+ * $Id: camlp4_names.mli,v 1.6 2012/05/22 07:38:36 tews Exp $
  * 
  * names and aliases of camlp4 modules and executables
  * 
diff --git a/conf.mli b/conf.mli
index d69b794..398673f 100644
--- a/conf.mli
+++ b/conf.mli
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: conf.mli,v 1.4 2012-03-28 20:46:10 tews Exp $
+ * $Id: conf.mli,v 1.4 2012/03/28 20:46:10 tews Exp $
  * 
  * configuration
  * 
diff --git a/configure b/configure
index 673af07..6788364 100755
--- a/configure
+++ b/configure
@@ -23,14 +23,14 @@
 # along with "Otags reloaded". If not, see
 # <http://www.gnu.org/licenses/>.
 # 
-# $Id: configure,v 1.20 2012-05-22 19:28:23 tews Exp $
+# $Id: configure,v 1.22 2012/12/05 09:29:31 tews Exp $
 # 
 ##############################################################################
 
 set -e
 
-REQUIRED_OCAML_VERSION=3.12
-OTAGS_VERSION=5
+REQUIRED_OCAML_VERSION=4.00
+OTAGS_VERSION=1
 
 root=/usr/local
 bindir=$root/bin
@@ -284,11 +284,11 @@ done
 
 if [ $ocaml_lib_dir ] ; then
     typeconvdir=$ocaml_lib_dir/sexplib
-    sexpdir=$ocaml_lib_dir/type-conv
+    sexpdir=$ocaml_lib_dir/type_conv
 else
-    if ocamlfind query type-conv > /dev/null ; then
+    if ocamlfind query type_conv > /dev/null ; then
 	if ocamlfind query sexplib > /dev/null ; then
-	    typeconvdir=$(ocamlfind query type-conv)
+	    typeconvdir=$(ocamlfind query type_conv)
 	    sexpdir=$(ocamlfind query sexplib)
 	else
 	    typeconvdir=
diff --git a/doc/changes.html b/doc/changes.html
index fddc269..471ebc6 100644
--- a/doc/changes.html
+++ b/doc/changes.html
@@ -33,6 +33,15 @@ pre {
  ! - </UL>
   -->
 
+<DT>2012-12-05: otags 4.00.1 released
+<DD>
+<UL>
+<LI>support GADT's</LI>
+<LI>first release for OCaml 4.00
+<P></P>
+</LI>
+</UL>
+
 <DT>2012-05-23: otags 3.12.5 released
 <DD>
 <UL>
@@ -52,6 +61,8 @@ trees, see option <KBD>-parser-hints</KBD>
 </LI>
 </UL>
 
+<!-- RECENT CHANGES END -->
+
 <DT>2012-05-16: otags 3.12.3 released
 <DD>
 <UL>
@@ -67,8 +78,6 @@ compilation changes
 </LI>
 </UL>
 
-<!-- RECENT CHANGES END -->
-
 <DT>2012-02-06: otags 3.12.2 released
 <DD>
 <UL>
@@ -126,7 +135,7 @@ HREF="http://caml.inria.fr/mantis/view.php?id=5159" >#5159</A>
 <HR noshade size=2>
 <FONT SIZE="-2">
 last changed on 
-<!-- hhmts start -->23 May 2012
+<!-- hhmts start --> 5 Dec 2012
 <!-- hhmts end -->
 by <A HREF="/index.html.en">Hendrik</A>
 </FONT></BODY> </HTML>
diff --git a/doc/otags.1 b/doc/otags.1
index f1acbd6..591ca46 100644
--- a/doc/otags.1
+++ b/doc/otags.1
@@ -614,27 +614,8 @@ could only marginally recover
 .\" ================ Bugs ====================================================
 .\" ==========================================================================
 .\"
-.SH BUGS
+.\" .SH BUGS
 .\" ============= camlp4 ast magic number bug ================================
-.P
-When 
-.B otags
-uses an external
-.B camlp4
-process for parsing, the abstract syntax tree is sent to 
-.B otags
-as marshaled value using the 
-.I DumpCamlp4
-printer. Because the magic numbers have not been changed since
-apparently 2006 (see bug #5481), 
-.B otags
-cannot detect an incompatible 
-.B camlp4
-version. Therefore, 
-.B otags
-is likely to produce segmentation faults when you change the 
-.B camlp4
-executables in place.
 .\"
 .\" ==========================================================================
 .\" ================ Missing Features ========================================
@@ -643,6 +624,23 @@ executables in place.
 .SH MISSING FEATURES
 Appending to vi tags files requires to reread the existing tags
 file, because vi tags files are sorted.
+.P
+.\" ============= paragraph DynLoader error ==============================
+Incompatible
+.B camlp4
+syntax trees (from external 
+.B camlp4
+parsing processes) are detected with magic numbers. However, an
+incompatible 
+.B camlp4
+will likely die when it tries to load the 
+.B otags
+specific
+.B camlp4
+printer. Such fatal dynamic loader errors are treated like
+parsing errors, because 
+.B camlp4
+produces the same exit status in both cases.
 .\"
 .\" ==========================================================================
 .\" ================ Credits =================================================
diff --git a/doc/otags.html b/doc/otags.html
index e344d6f..bdf249e 100644
--- a/doc/otags.html
+++ b/doc/otags.html
@@ -840,55 +840,49 @@ could only marginally recover
 
 
 
-</DL>
-<A NAME="lbAL"> </A>
-<H2>BUGS</H2>
 
 
-<P>
 
-When 
-<B>otags</B>
 
-uses an external
-<B>camlp4</B>
 
-process for parsing, the abstract syntax tree is sent to 
-<B>otags</B>
 
-as marshaled value using the 
-<I>DumpCamlp4</I>
 
-printer. Because the magic numbers have not been changed since
-apparently 2006 (see bug #5481), 
-<B>otags</B>
+</DL>
+<A NAME="lbAL"> </A>
+<H2>MISSING FEATURES</H2>
 
-cannot detect an incompatible 
-<B>camlp4</B>
+Appending to vi tags files requires to reread the existing tags
+file, because vi tags files are sorted.
+<P>
 
-version. Therefore, 
-<B>otags</B>
 
-is likely to produce segmentation faults when you change the 
+Incompatible
 <B>camlp4</B>
 
-executables in place.
+syntax trees (from external 
+<B>camlp4</B>
 
+parsing processes) are detected with magic numbers. However, an
+incompatible 
+<B>camlp4</B>
 
+will likely die when it tries to load the 
+<B>otags</B>
 
+specific
+<B>camlp4</B>
 
+printer. Such fatal dynamic loader errors are treated like
+parsing errors, because 
+<B>camlp4</B>
 
-<A NAME="lbAM"> </A>
-<H2>MISSING FEATURES</H2>
-
-Appending to vi tags files requires to reread the existing tags
-file, because vi tags files are sorted.
+produces the same exit status in both cases.
 
 
 
 
 
-<A NAME="lbAN"> </A>
+<A NAME="lbAM"> </A>
 <H2>CREDITS</H2>
 
 Cuihtlauac Alvarado and Jean-Francois Monin were the first to
@@ -911,7 +905,7 @@ version 3.10 and onwards.
 
 
 
-<A NAME="lbAO"> </A>
+<A NAME="lbAN"> </A>
 <H2>AUTHOR</H2>
 
 Hendrik Tews <otags at askra.de>
@@ -920,7 +914,7 @@ Hendrik Tews <otags at askra.de>
 
 
 
-<A NAME="lbAP"> </A>
+<A NAME="lbAO"> </A>
 <H2>SEE ALSO</H2>
 
 <B><A HREF="http://www.linuxmanpages.com/man1/etags.1.php">etags</A></B>(1),
@@ -950,16 +944,15 @@ Hendrik Tews <otags at askra.de>
 <DT><A HREF="#lbAI">STANDARD CAMLP4 PARSING EXTENSIONS</A><DD>
 <DT><A HREF="#lbAJ">DIAGNOSTICS</A><DD>
 <DT><A HREF="#lbAK">EXIT STATUS</A><DD>
-<DT><A HREF="#lbAL">BUGS</A><DD>
-<DT><A HREF="#lbAM">MISSING FEATURES</A><DD>
-<DT><A HREF="#lbAN">CREDITS</A><DD>
-<DT><A HREF="#lbAO">AUTHOR</A><DD>
-<DT><A HREF="#lbAP">SEE ALSO</A><DD>
+<DT><A HREF="#lbAL">MISSING FEATURES</A><DD>
+<DT><A HREF="#lbAM">CREDITS</A><DD>
+<DT><A HREF="#lbAN">AUTHOR</A><DD>
+<DT><A HREF="#lbAO">SEE ALSO</A><DD>
 </DL>
 <HR>
 This document was created by
 <A HREF="http://www.nongnu.org/man2html/">man2html</A>,
 using the manual pages.<BR>
-Time: 20:14:55 GMT, May 23, 2012
+Time: 12:23:35 GMT, December 05, 2012
 </BODY>
 </HTML>
diff --git a/emacs.ml b/emacs.ml
index fb68b6e..4b0fc45 100644
--- a/emacs.ml
+++ b/emacs.ml
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: emacs.ml,v 1.12 2012-05-18 19:12:11 tews Exp $
+ * $Id: emacs.ml,v 1.12 2012/05/18 19:12:11 tews Exp $
  * 
  * write emacs tags files
  * 
diff --git a/emacs.mli b/emacs.mli
index d346962..f67ba9c 100644
--- a/emacs.mli
+++ b/emacs.mli
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: emacs.mli,v 1.4 2012-01-14 21:31:39 tews Exp $
+ * $Id: emacs.mli,v 1.4 2012/01/14 21:31:39 tews Exp $
  * 
  * write emacs tags files
  * 
diff --git a/global.ml b/global.ml
index 3ff47f9..d525fdd 100644
--- a/global.ml
+++ b/global.ml
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: global.ml,v 1.14 2012-05-22 07:45:44 tews Exp $
+ * $Id: global.ml,v 1.14 2012/05/22 07:45:44 tews Exp $
  * 
  * global variables
  * 
diff --git a/global.mli b/global.mli
index c6a23da..4266c5b 100644
--- a/global.mli
+++ b/global.mli
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: global.mli,v 1.13 2012-05-21 09:29:29 tews Exp $
+ * $Id: global.mli,v 1.13 2012/05/21 09:29:29 tews Exp $
  * 
  * global variables
  * 
diff --git a/misc.ml b/misc.ml
index b2b678c..2333c95 100644
--- a/misc.ml
+++ b/misc.ml
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: misc.ml,v 1.9 2012-05-21 09:29:29 tews Exp $
+ * $Id: misc.ml,v 1.9 2012/05/21 09:29:29 tews Exp $
  * 
  * some misc functions
  * 
diff --git a/misc.mli b/misc.mli
index 52330ca..b25df4f 100644
--- a/misc.mli
+++ b/misc.mli
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: misc.mli,v 1.6 2012-05-21 09:29:29 tews Exp $
+ * $Id: misc.mli,v 1.6 2012/05/21 09:29:29 tews Exp $
  * 
  * some misc functions
  * 
diff --git a/monitor_line_directive.ml b/monitor_line_directive.ml
index b845efb..a002a83 100644
--- a/monitor_line_directive.ml
+++ b/monitor_line_directive.ml
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: monitor_line_directive.ml,v 1.1 2012-02-17 13:06:25 tews Exp $
+ * $Id: monitor_line_directive.ml,v 1.1 2012/02/17 13:06:25 tews Exp $
  * 
  * filter and store line directives
  * 
diff --git a/monitor_line_directive.mli b/monitor_line_directive.mli
index a74bcf9..928d65c 100644
--- a/monitor_line_directive.mli
+++ b/monitor_line_directive.mli
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: monitor_line_directive.mli,v 1.1 2012-02-17 13:06:25 tews Exp $
+ * $Id: monitor_line_directive.mli,v 1.1 2012/02/17 13:06:25 tews Exp $
  * 
  * filter and store line directives
  * 
diff --git a/otags.ml b/otags.ml
index a134f38..99a2176 100644
--- a/otags.ml
+++ b/otags.ml
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: otags.ml,v 1.32 2012-05-22 07:38:36 tews Exp $
+ * $Id: otags.ml,v 1.33 2012/12/05 12:18:16 tews Exp $
  * 
  * main module with main function
  * 
@@ -91,10 +91,12 @@ let read_camlp4_dump ic file unit =
 	  | Structure -> Struct_ast(input_value ic : str_item_t)
       in
       (line_directives, comp_unit)
-    else 
-      raise Skip_entry
+    else begin
+      Printf.eprintf 
+	"External camlp4 has incompatible version. Reinstall otags.\n";
+      exit 2
+    end
   with
-    | Skip_entry 
     | End_of_file ->
       Printf.eprintf "Error while reading the camlp4 ast for %s\n" file;
       raise Skip_entry
diff --git a/parser_factory.ml b/parser_factory.ml
index c616fc7..ae47164 100644
--- a/parser_factory.ml
+++ b/parser_factory.ml
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: parser_factory.ml,v 1.19 2012-05-21 09:29:29 tews Exp $
+ * $Id: parser_factory.ml,v 1.19 2012/05/21 09:29:29 tews Exp $
  * 
  * build new camlp4 parsers
  * 
diff --git a/parser_factory.mli b/parser_factory.mli
index 2b11289..04a8f97 100644
--- a/parser_factory.mli
+++ b/parser_factory.mli
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: parser_factory.mli,v 1.6 2012-05-21 09:29:29 tews Exp $
+ * $Id: parser_factory.mli,v 1.6 2012/05/21 09:29:29 tews Exp $
  * 
  * build new camlp4 parsers
  * 
diff --git a/parser_hints.ml b/parser_hints.ml
index a625a6e..61bc9c9 100644
--- a/parser_hints.ml
+++ b/parser_hints.ml
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: parser_hints.ml,v 1.1 2012-05-21 09:29:29 tews Exp $
+ * $Id: parser_hints.ml,v 1.1 2012/05/21 09:29:29 tews Exp $
  * 
  * parser hints functionality
  * 
diff --git a/parser_hints.mli b/parser_hints.mli
index 4fcd082..1b154bd 100644
--- a/parser_hints.mli
+++ b/parser_hints.mli
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: parser_hints.mli,v 1.1 2012-05-21 09:29:29 tews Exp $
+ * $Id: parser_hints.mli,v 1.1 2012/05/21 09:29:29 tews Exp $
  * 
  * parser hints functionality
  * 
diff --git a/reparse.ml b/reparse.ml
index 5b489bf..1d095eb 100644
--- a/reparse.ml
+++ b/reparse.ml
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: reparse.ml,v 1.14 2012-01-23 14:27:30 tews Exp $
+ * $Id: reparse.ml,v 1.14 2012/01/23 14:27:30 tews Exp $
  * 
  * location-parsing hack for those ast nodes that do not provide
  * sufficient location info
diff --git a/reparse.mli b/reparse.mli
index 5b8dd8a..1472a7a 100644
--- a/reparse.mli
+++ b/reparse.mli
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: reparse.mli,v 1.8 2012-01-14 21:31:39 tews Exp $
+ * $Id: reparse.mli,v 1.8 2012/01/14 21:31:39 tews Exp $
  * 
  * location-parsing hack for those ast nodes that do not provide
  * sufficient location info
diff --git a/source_channel.ml b/source_channel.ml
index 3e425ae..f7a0207 100644
--- a/source_channel.ml
+++ b/source_channel.ml
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: source_channel.ml,v 1.3 2012-05-22 06:16:46 tews Exp $
+ * $Id: source_channel.ml,v 1.3 2012/05/22 06:16:46 tews Exp $
  * 
  * hold the in_channel of the source file
  * 
diff --git a/source_channel.mli b/source_channel.mli
index d092ad2..efc30e4 100644
--- a/source_channel.mli
+++ b/source_channel.mli
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: source_channel.mli,v 1.3 2012-05-22 06:16:46 tews Exp $
+ * $Id: source_channel.mli,v 1.3 2012/05/22 06:16:46 tews Exp $
  * 
  * hold the in_channel of the source file
  * 
diff --git a/tags.ml b/tags.ml
index c511b84..18cb14b 100644
--- a/tags.ml
+++ b/tags.ml
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: tags.ml,v 1.26 2012-05-22 06:16:47 tews Exp $
+ * $Id: tags.ml,v 1.29 2012/12/05 09:29:31 tews Exp $
  * 
  * recursive tagging function
  * 
@@ -54,6 +54,13 @@ let tag_constructor_decl write_tag = function
      *)
     let wrong_id_loc = translate_loc (Ast.loc_of_ident id) in
     write_tag (Reparse.loc_of_first_word wrong_id_loc) uid
+  (* the next case is for GADT constructors in OCaml 4.00 *)
+  | <:ctyp< $id:<:ident< $uid:uid$>> as id$ : $_$ >> ->
+    (* Wrong location info in id: XXX not reported yet
+     * We need the first word
+     *)
+    let wrong_id_loc = translate_loc (Ast.loc_of_ident id) in
+    write_tag (Reparse.loc_of_first_word wrong_id_loc) uid
   | _ -> assert false
 
 
@@ -145,6 +152,9 @@ let rec tag_type write_tag typ = match typ with
   | <:ctyp< + ' $_$ >>			(* type parameter *)
   | <:ctyp< - ' $_$ >>			(* type parameter *)
   | <:ctyp< _ >>			(* anonymous type variable *)
+  | Ast.TyAnP _				(* no syntax for + _ *)
+  | Ast.TyAnM _				(* no syntax for - _ *)
+  | Ast.TyTypePol _			(* no syntax for type x . type-expr *)
   | <:ctyp< $anti:_$ >>
       -> assert false
 
@@ -511,6 +521,13 @@ let rec tag_let_pattern write_tag = function
     in
     write_tag loc lid;
     (* Printf.eprintf "TAGPATTEND\n%!" *)
+
+  (* let matching with constant constructors: let A = ... in ... *)
+  | <:patt< $uid:_$ >>
+  | <:patt< $id: <:ident< $_$ . $_$ >> $ >>
+  | <:patt< $id: <:ident< $anti:_$ >> $ >> -> ()
+  | <:patt< $id: <:ident< $_$ $_$ >> $ >> -> assert false
+
   | <:patt< ( $tup:p1$ ) >> ->
     List.iter
       (tag_let_pattern write_tag)
@@ -543,8 +560,34 @@ let rec tag_let_pattern write_tag = function
   | <:patt< ($p1$ : $_$) >> ->
     tag_let_pattern write_tag p1
 
-  (* XXX catch all *)
-  | _ -> ()
+  | <:patt< $chr:_$ >>
+  | <:patt< $int:_$ >>
+  | <:patt< $int32:_$ >>
+  | <:patt< $int64:_$ >>
+  | <:patt< $nativeint:_$ >>
+  | <:patt< $str:_$ >>
+  | <:patt< $flo:_$ >>
+  | <:patt< [| $_$ |] >>
+  | <:patt< { $_$ } >>
+  | <:patt< ` $_$ >>
+  | <:patt< # $_$ >>
+  | <:patt< $_$ .. $_$ >>
+  | <:patt< $_$ | $_$ >>
+  | <:patt< $_$ $_$ >>			(* eg, constructor application :: *)
+  | <:patt< _ >>
+  | <:patt< lazy $_$ >>
+  | <:patt< $anti:_$ >>
+    -> ()
+
+  | <:patt< $_$ = $_$ >> 		(* only inside records *)
+  | <:patt< ~ $_$ : $_$ >>	        (* only inside fun expressions *)
+  | <:patt< ? $_$ : ( $_$ ) >>	        (* only inside fun expressions *)
+  | <:patt< ? $_$ : ( $_$ = $_$ ) >>	(* only inside fun expressions *)
+  | <:patt< $_$ ; $_$ >>		(* only inside arrays, records *)
+  | <:patt< $_$ , $_$ >>		(* handled by Ast.list_of_patt *)
+  | <:patt< ( module $_$ ) >>  (* package pattern not permitted in top-level *)
+  | <:patt< >> 
+    -> assert false
 
 
 
diff --git a/tags.mli b/tags.mli
index 4679305..be93360 100644
--- a/tags.mli
+++ b/tags.mli
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: tags.mli,v 1.9 2012-01-14 21:31:40 tews Exp $
+ * $Id: tags.mli,v 1.9 2012/01/14 21:31:40 tews Exp $
  * 
  * recursive tagging function
  * 
diff --git a/test/a.ml b/test/a.ml
index 9713979..d30430c 100644
--- a/test/a.ml
+++ b/test/a.ml
@@ -184,6 +184,17 @@ module type A85 = sig end
 module A86 = (val (module struct end : A85) : A85)
 
 
+type 'a a87_term =
+  | Int : int -> int a87_term
+  | Add : (int -> int -> int) a87_term
+  | App : ('b -> 'a) a87_term * 'b a87_term -> 'a a87_term
+
+let rec a88_eval : type a. a a87_term -> a = function
+  | Int n    -> n
+  | Add      -> (fun x y -> x+y)
+  | App(f,x) -> (a88_eval f) (a88_eval x)
+
+
 (*** Local Variables: ***)
 (*** compile-command: "make -C .. testtrue" ***)
 (*** End: ***)
diff --git a/test/d.ml b/test/d.ml
index 363dba5..47cd197 100644
--- a/test/d.ml
+++ b/test/d.ml
@@ -1,5 +1,5 @@
 
-(* $Id: d.ml,v 1.1.1.1 2010-08-05 14:45:45 tews Exp $ *)
+(* $Id: d.ml,v 1.1.1.1 2010/08/05 14:45:45 tews Exp $ *)
 
 let f1 x = 12
 (*
diff --git a/test/test.TAGS b/test/test.TAGS
index 298b4d7..813ecc3 100644
--- a/test/test.TAGS
+++ b/test/test.TAGS
@@ -8,7 +8,7 @@ type t = A | Bt_of_sexp__1,0
 type t = A | Bt_of_sexp1,0
 type t = A | Bsexp_of_t1,0
 

-test/a.ml,2426
+test/a.ml,2559
 A1,0
 let a0a02,1
 let f0f04,13
@@ -103,6 +103,11 @@ and A83A83176,2479
   let a84a84179,2524
 module type A85A85182,2543
 module A86A86184,2570
+type 'a a87_terma87_term187,2623
+  | IntInt188,2642
+  | AddAdd189,2672
+  | AppApp190,2711
+let rec a88_evala88_eval192,2771
 

 test/b.ml,67
 B1,0
@@ -157,16 +162,16 @@ class type x_classx_class88,1160
   val mutable yy89,1188
 let ( <:><:>93,1218
 

+test/cpp_h.include.ml,57
+let cpp_inc_acpp_inc_a2,1
+let cpp_inc_bcpp_inc_b5,21
+

 test/cpp_h.source.ml,24
 let ccp_h_accp_h_a2,1
 

 test/cpp_h.generated.ml,21
 Cpp_h.generated1,0
 

-test/cpp_h.include.ml,57
-let cpp_inc_acpp_inc_a2,1
-let cpp_inc_bcpp_inc_b5,21
-

 test/c.mli,332
 C1,0
 val c0c02,1
@@ -206,9 +211,9 @@ class ['a] int_value3int_value319,276
 test/cpp_i.generated.ml,21
 Cpp_i.generated1,0
 

-test/cpp_i.source.ml,24
-let ccp_i_accp_i_a2,1
-

 test/cpp_i.include.ml,65
 let cpp_i_inc_acpp_i_inc_a2,1
 let cpp_i_inc_bcpp_i_inc_b5,23
+

+test/cpp_i.source.ml,24
+let ccp_i_accp_i_a2,1
diff --git a/test/test.tags b/test/test.tags
index 04360f8..bfeafdf 100644
--- a/test/test.tags
+++ b/test/test.tags
@@ -40,6 +40,8 @@ A83	test/a.ml	/^and A83 : sig $/;
 A85	test/a.ml	/^module type A85 = sig end$/;
 A86	test/a.ml	/^module A86 = (val (module struct end : A85) : A85)$/;
 A9	test/a.ml	/^exception A9 = A8$/;
+Add	test/a.ml	/^  | Add : (int -> int -> int) a87_term$/;
+App	test/a.ml	/^  | App : ('b -> 'a) a87_term * 'b a87_term -> 'a a87_term$/;
 B	test/b.ml	1;
 B	test/d.ml	/^  | B  | C$/;
 B	test/f.ml	/^type t = A | B with sexp$/;
@@ -59,6 +61,7 @@ E	test/e.mli	1;
 END	test/d.ml	/^module type END = sig $/;
 END	test/e.mli	/^module type END = sig $/;
 F	test/f.ml	1;
+Int	test/a.ml	/^  | Int : int -> int a87_term$/;
 Modu	test/d.ml	/^module Modu =$/;
 No_value	test/d.ml	/^exception No_value$/;
 _a69	test/a.ml	/^let _a69 = 5$/;
@@ -113,6 +116,8 @@ a80	test/a.ml	/^type a80 = A81$/;
 a82	test/a.ml	/^type a82 = a80 = A81$/;
 a84	test/a.ml	/^  val a84 : int $/;
 a84	test/a.ml	/^  let a84 = 5$/;
+a87_term	test/a.ml	/^type 'a a87_term =$/;
+a88_eval	test/a.ml	/^let rec a88_eval : type a. a a87_term -> a = function$/;
 a_type	test/d.ml	/^type a_type = $/;
 add	test/d.ml	/^  method add n = match r with$/;
 b	test/d.ml	/^type b = {g:int;           rr:int}$/;
diff --git a/translate_location.ml b/translate_location.ml
index c68b233..a4127cf 100644
--- a/translate_location.ml
+++ b/translate_location.ml
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: translate_location.ml,v 1.2 2012-02-17 13:06:25 tews Exp $
+ * $Id: translate_location.ml,v 1.2 2012/02/17 13:06:25 tews Exp $
  * 
  * translate locations after line directives
  * 
diff --git a/translate_location.mli b/translate_location.mli
index 6a3066c..8fe530e 100644
--- a/translate_location.mli
+++ b/translate_location.mli
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: translate_location.mli,v 1.2 2012-02-17 13:06:25 tews Exp $
+ * $Id: translate_location.mli,v 1.2 2012/02/17 13:06:25 tews Exp $
  * 
  * translate locations after line directives
  * 
diff --git a/types.ml b/types.ml
index 66a15f5..7241946 100644
--- a/types.ml
+++ b/types.ml
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: types.ml,v 1.10 2012-01-23 14:27:30 tews Exp $
+ * $Id: types.ml,v 1.10 2012/01/23 14:27:30 tews Exp $
  * 
  * global type definitions
  * 
diff --git a/types.mli b/types.mli
index 249b4c8..23cf0b9 100644
--- a/types.mli
+++ b/types.mli
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: types.mli,v 1.10 2012-01-23 14:27:30 tews Exp $
+ * $Id: types.mli,v 1.10 2012/01/23 14:27:30 tews Exp $
  * 
  * global type definitions
  * 
diff --git a/util/dump-camlp4.ml b/util/dump-camlp4.ml
index 2420ce3..ca2ebcf 100644
--- a/util/dump-camlp4.ml
+++ b/util/dump-camlp4.ml
@@ -17,6 +17,8 @@ let dump_file = ref None
 
 let print_locations = ref true
 
+let input_file = ref None
+
 let arguments = Arg.align [
   ("-r", Arg.Clear standard_syntax,
    " parse revised syntax");
@@ -24,6 +26,8 @@ let arguments = Arg.align [
    " parse interface");
   ("-ocaml", Arg.Set_string ocaml_path,
    "path set the path to the ocaml bin-dir");
+  ("-f", Arg.String(fun f -> input_file := Some f),
+   "input-file parse input-file (instead of stdin)");
   ("-dump", Arg.String(fun f -> dump_file := Some f),
    "dump-file print ast from dump-file instead of parsing input");
   ("-noloc", Arg.Clear print_locations,
@@ -46,8 +50,13 @@ let mode_flag = match !parse_impl with
   | true -> "-impl"
   | false -> "-intf"
 
+let input_source = match !input_file with
+  | Some f -> f
+  | None -> "-"
+
 let parse_command = 
-  camlp4_name ^ " " ^ mode_flag ^ " - -printer d > camlp4-dump"
+  camlp4_name ^ " " ^ mode_flag ^ " " ^ input_source 
+  ^ " -printer d > camlp4-dump"
 
 let _ = 
   match !dump_file with
@@ -108,6 +117,7 @@ let input =
   " 
   ^ loc_printer ^ "\n"
   ^
+  (* #directory "+compiler-libs";; *)
   "#install_printer loc_printer;;
    open Camlp4.PreCast.Ast;;
    let buf = String.create 14 in
diff --git a/vi.ml b/vi.ml
index cd26b7f..fb28945 100644
--- a/vi.ml
+++ b/vi.ml
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: vi.ml,v 1.9 2012-01-26 13:16:19 tews Exp $
+ * $Id: vi.ml,v 1.9 2012/01/26 13:16:19 tews Exp $
  * 
  * write vi tags files
  * 
diff --git a/vi.mli b/vi.mli
index 53972f2..a6d9220 100644
--- a/vi.mli
+++ b/vi.mli
@@ -19,7 +19,7 @@
  * along with "Otags reloaded". If not, see
  * <http://www.gnu.org/licenses/>.
  * 
- * $Id: vi.mli,v 1.3 2012-01-14 21:31:40 tews Exp $
+ * $Id: vi.mli,v 1.3 2012/01/14 21:31:40 tews Exp $
  * 
  * write vi tags files
  * 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/otags.git



More information about the Pkg-ocaml-maint-commits mailing list