[Pkg-ocaml-maint-commits] [camlp5] 01/04: Imported Upstream version 6.11

Stéphane Glondu glondu at alioth.debian.org
Fri Nov 8 16:16:20 UTC 2013


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

glondu pushed a commit to branch master
in repository camlp5.

commit c708dd3a5cb85846b3dc32a629f7047145ac7e6f
Author: Stephane Glondu <steph at glondu.net>
Date:   Fri Nov 8 17:09:19 2013 +0100

    Imported Upstream version 6.11
---
 CHANGES                               |   12 ++++++++++++
 README                                |    2 +-
 etc/pa_lefteval.ml                    |    4 ++--
 etc/pa_o.ml                           |   14 +++++++-------
 etc/pa_scheme.ml                      |    6 +++---
 etc/pa_schemer.ml                     |    4 ++--
 etc/pa_sml.ml                         |    4 ++--
 etc/pr_depend.ml                      |    4 ++--
 etc/pr_o.ml                           |    6 +++---
 etc/pr_r.ml                           |    6 +++---
 etc/pr_scheme.ml                      |    6 +++---
 lib/plexer.ml                         |   10 ++--------
 main/mLast.mli                        |    3 ++-
 main/pcaml.ml                         |    4 ++--
 meta/pa_r.ml                          |   10 +++++-----
 meta/q_MLast.ml                       |    6 +++---
 ocaml_src/lib/plexer.ml               |   32 +++++++++++++++-----------------
 ocaml_src/main/mLast.mli              |    1 +
 ocaml_src/main/pcaml.ml               |    2 +-
 ocaml_src/meta/pa_r.ml                |    9 +++++----
 ocaml_src/meta/q_MLast.ml             |   32 ++++++++------------------------
 ocaml_stuff/4.01.0/utils/warnings.mli |    1 +
 top/rprint.ml                         |    4 ++--
 23 files changed, 87 insertions(+), 95 deletions(-)

diff --git a/CHANGES b/CHANGES
index 2bdd51f..c46b0ef 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,15 @@
+Camlp5 Version 6.11:
+--------------------
+
+* [22 Jul 13] Updated for ocaml version 4.01.0
+* [02 Jul 13] Added 'MLast.loc_of_with_constr'.
+* [02 Jul 13] Fixed bug toplevel with revised syntax; "= 'a" was missing
+  in output in that example:
+    # module type A = sig module type S = 'a; end;
+    module type A = sig module type S; end
+* [02 Jul 13] Now accept lowercase ident for module types, like ocaml does.
+  Accepted also in revised syntax.
+
 Camlp5 Version 6.10:
 --------------------
 
diff --git a/README b/README
index e16b8d8..b90d369 100644
--- a/README
+++ b/README
@@ -5,7 +5,7 @@ OVERVIEW
   It is compatible with all versions of ocaml from 1.07 to 4.01.0 and
   jocaml 3.12.0 to 3.12.1.
 
-  This Camlp5 version is 6.10.
+  This Camlp5 version is 6.11.
 
   Camlp5 must be compiled either in "transitional mode" or in "strict mode".
   See the file MODE for information.
diff --git a/etc/pa_lefteval.ml b/etc/pa_lefteval.ml
index b6298dd..82e2d08 100644
--- a/etc/pa_lefteval.ml
+++ b/etc/pa_lefteval.ml
@@ -1,5 +1,5 @@
 (* camlp5r *)
-(* $Id: pa_lefteval.ml,v 6.3 2012-01-09 14:22:20 deraugla Exp $ *)
+(* $Id: pa_lefteval.ml,v 6.4 2013-07-02 16:12:43 deraugla Exp $ *)
 (* Copyright (c) INRIA 2007-2012 *)
 
 #load "q_MLast.cmo";
@@ -205,7 +205,7 @@ and str_item x =
   | <:str_item< $exp:e$ >> -> <:str_item< $exp:expr e$ >>
   | <:str_item< open $_$ >> | <:str_item< type $list:_$ >> |
     <:str_item< exception $uid:_$ of $list:_$ = $_$ >> |
-    <:str_item< module type $uid:_$ = $_$ >> |
+    <:str_item< module type $_$ = $_$ >> |
     <:str_item< # $lid:_$ $opt:_$ >> ->
       x
   | x -> not_impl "str_item" x ]
diff --git a/etc/pa_o.ml b/etc/pa_o.ml
index 6d09772..988934b 100644
--- a/etc/pa_o.ml
+++ b/etc/pa_o.ml
@@ -1,5 +1,5 @@
 (* camlp5r pa_macro.cmo *)
-(* $Id: pa_o.ml,v 6.49 2013-04-19 08:43:39 deraugla Exp $ *)
+(* $Id: pa_o.ml,v 6.50 2013-07-02 16:12:43 deraugla Exp $ *)
 (* Copyright (c) INRIA 2007-2012 *)
 
 #load "pa_extend.cmo";
@@ -400,8 +400,8 @@ EXTEND
       | "include"; me = module_expr -> <:str_item< include $me$ >>
       | "module"; r = V (FLAG "rec"); l = V (LIST1 mod_binding SEP "and") ->
           <:str_item< module $_flag:r$ $_list:l$ >>
-      | "module"; "type"; i = V UIDENT "uid" ""; "="; mt = module_type ->
-          <:str_item< module type $_uid:i$ = $mt$ >>
+      | "module"; "type"; i = V ident ""; "="; mt = module_type ->
+          <:str_item< module type $_:i$ = $mt$ >>
       | "open"; i = V mod_ident "list" "" ->
           <:str_item< open $_:i$ >>
       | "type"; tdl = V (LIST1 type_decl SEP "and") ->
@@ -475,10 +475,10 @@ EXTEND
       | "module"; rf = V (FLAG "rec");
         l = V (LIST1 mod_decl_binding SEP "and") ->
           <:sig_item< module $_flag:rf$ $_list:l$ >>
-      | "module"; "type"; i = V UIDENT "uid" ""; "="; mt = module_type ->
-          <:sig_item< module type $_uid:i$ = $mt$ >>
-      | "module"; "type"; i = V UIDENT "uid" "" ->
-          <:sig_item< module type $_uid:i$ = 'abstract >>
+      | "module"; "type"; i = V ident ""; "="; mt = module_type ->
+          <:sig_item< module type $_:i$ = $mt$ >>
+      | "module"; "type"; i = V ident "" ->
+          <:sig_item< module type $_:i$ = 'abstract >>
       | "open"; i = V mod_ident "list" "" ->
           <:sig_item< open $_:i$ >>
       | "type"; tdl = V (LIST1 type_decl SEP "and") ->
diff --git a/etc/pa_scheme.ml b/etc/pa_scheme.ml
index 273dc43..5ca749b 100644
--- a/etc/pa_scheme.ml
+++ b/etc/pa_scheme.ml
@@ -1,5 +1,5 @@
 ; camlp5 ./pa_schemer.cmo pa_extend.cmo q_MLast.cmo pr_dump.cmo
-; $Id: pa_scheme.ml,v 6.9 2012-01-09 14:22:21 deraugla Exp $
+; $Id: pa_scheme.ml,v 6.10 2013-07-02 16:12:43 deraugla Exp $
 ; Copyright (c) INRIA 2007-2012
 
 (open Pcaml)
@@ -488,7 +488,7 @@
      <:sig_item< module $flag:rf$ $_list:lmb$ >>))
    ((Sexpr loc [(Slid _ "moduletype") se1 se2])
     (let* ((s (anti_uid_or_error se1)) (mt (module_type_se se2)))
-     <:sig_item< module type $_uid:s$ = $mt$ >>))
+     <:sig_item< module type $_:s$ = $mt$ >>))
    ((Sexpr loc [(Slid _ "open") se])
     (let ((s (anti_longident_se se))) <:sig_item< open $_:s$ >>))
    ((Sexpr loc [(Slid _ "type") . sel])
@@ -543,7 +543,7 @@
      <:str_item< module $flag:rf$ $_list:lmb$ >>))
    ((Sexpr loc [(Slid _ "moduletype") se1 se2])
     (let* ((s (anti_uid_or_error se1)) (mt (module_type_se se2)))
-     <:str_item< module type $_uid:s$ = $mt$ >>))
+     <:str_item< module type $_:s$ = $mt$ >>))
    ((Sexpr loc [(Slid _ "open") se])
     (let ((s (anti_longident_se se))) <:str_item< open $_:s$ >>))
    ((Sexpr loc [(Slid _ "type") . sel])
diff --git a/etc/pa_schemer.ml b/etc/pa_schemer.ml
index 6202b58..dd25899 100644
--- a/etc/pa_schemer.ml
+++ b/etc/pa_schemer.ml
@@ -773,7 +773,7 @@ and sig_item_se =
   | Sexpr loc [Slid _ "moduletype"; se1; se2] →
       let s = anti_uid_or_error se1 in
       let mt = module_type_se se2 in
-      <:sig_item< module type $_uid:s$ = $mt$ >>
+      <:sig_item< module type $_:s$ = $mt$ >>
   | Sexpr loc [Slid _ "open"; se] →
       let s = anti_longident_se se in
       <:sig_item< open $_:s$ >>
@@ -838,7 +838,7 @@ and str_item_se se =
   | Sexpr loc [Slid _ "moduletype"; se1; se2] →
       let s = anti_uid_or_error se1 in
       let mt = module_type_se se2 in
-      <:str_item< module type $_uid:s$ = $mt$ >>
+      <:str_item< module type $_:s$ = $mt$ >>
   | Sexpr loc [Slid _ "open"; se] →
       let s = anti_longident_se se in
       <:str_item< open $_:s$ >>
diff --git a/etc/pa_sml.ml b/etc/pa_sml.ml
index 71964d5..87654e4 100644
--- a/etc/pa_sml.ml
+++ b/etc/pa_sml.ml
@@ -1,5 +1,5 @@
 (* camlp5r *)
-(* $Id: pa_sml.ml,v 6.6 2012-01-09 14:22:21 deraugla Exp $ *)
+(* $Id: pa_sml.ml,v 6.7 2013-07-02 16:12:43 deraugla Exp $ *)
 (* Copyright (c) INRIA 2007-2012 *)
 
 #load "pa_extend.cmo";
@@ -808,7 +808,7 @@ EXTEND
   ;
   sigb:
     [ [ x1 = ident; "="; x2 = module_type ->
-          <:str_item< module type $uid:x1$ = $x2$ >> ] ]
+          <:str_item< module type $x1$ = $x2$ >> ] ]
   ;
   fsig:
     [ [ ":"; x1 = ident -> not_impl loc "fsig 1"
diff --git a/etc/pr_depend.ml b/etc/pr_depend.ml
index 570c059..16c5851 100644
--- a/etc/pr_depend.ml
+++ b/etc/pr_depend.ml
@@ -1,5 +1,5 @@
 (* camlp5r *)
-(* $Id: pr_depend.ml,v 6.16 2013-03-28 09:01:15 deraugla Exp $ *)
+(* $Id: pr_depend.ml,v 6.17 2013-07-02 16:12:43 deraugla Exp $ *)
 (* Copyright (c) INRIA 2007-2012 *)
 
 #load "pa_macro.cmo";
@@ -228,7 +228,7 @@ and str_item =
   | <:str_item< include $me$ >> -> module_expr me
   | <:str_item< module $flag:_$ $list:nel$ >> ->
       list (fun (_, me) -> module_expr me) nel
-  | <:str_item< module type $uid:_$ = $mt$ >> -> module_type mt
+  | <:str_item< module type $_$ = $mt$ >> -> module_type mt
   | <:str_item< open $[s :: _]$ >> -> addmodule s
   | <:str_item< type $list:tdl$ >> -> list type_decl tdl
   | <:str_item< value $flag:_$ $list:pel$ >> -> list let_binding pel
diff --git a/etc/pr_o.ml b/etc/pr_o.ml
index 2be3b02..db83c08 100644
--- a/etc/pr_o.ml
+++ b/etc/pr_o.ml
@@ -1,5 +1,5 @@
 (* camlp5r *)
-(* $Id: pr_o.ml,v 6.62 2012-03-18 09:00:42 deraugla Exp $ *)
+(* $Id: pr_o.ml,v 6.63 2013-07-02 16:12:43 deraugla Exp $ *)
 (* Copyright (c) INRIA 2007-2012 *)
 
 #directory ".";
@@ -1550,7 +1550,7 @@ EXTEND_PRINTER
           let mdl = List.map (fun (m, mt) -> (Pcaml.unvala m, mt)) mdl in
           let rf = if rf then " rec" else "" in
           vlist2 (str_module ("module" ^ rf)) (str_module "and") pc mdl
-      | <:str_item< module type $uid:m$ = $mt$ >> ->
+      | <:str_item< module type $m$ = $mt$ >> ->
           sig_module_or_module_type "module type" False '=' pc (m, mt)
       | <:str_item:< open $i$ >> ->
           pprintf pc "open %p" mod_ident (loc, i)
@@ -1599,7 +1599,7 @@ EXTEND_PRINTER
           let rf = if rf then " rec" else "" in
           vlist2 (sig_module_or_module_type ("module" ^ rf) True ':')
             (sig_module_or_module_type "and" True ':') pc mdl
-      | <:sig_item< module type $uid:m$ = $mt$ >> ->
+      | <:sig_item< module type $m$ = $mt$ >> ->
           sig_module_or_module_type "module type" False '=' pc (m, mt)
       | <:sig_item:< open $i$ >> ->
           pprintf pc "open %p" mod_ident (loc, i)
diff --git a/etc/pr_r.ml b/etc/pr_r.ml
index 136e7cd..9803b3a 100644
--- a/etc/pr_r.ml
+++ b/etc/pr_r.ml
@@ -1,5 +1,5 @@
 (* camlp5r *)
-(* $Id: pr_r.ml,v 6.78 2013-04-21 01:30:23 deraugla Exp $ *)
+(* $Id: pr_r.ml,v 6.79 2013-07-02 16:12:43 deraugla Exp $ *)
 (* Copyright (c) INRIA 2007-2012 *)
 
 #directory ".";
@@ -1596,7 +1596,7 @@ EXTEND_PRINTER
           let mdl = List.map (fun (m, mt) -> (Pcaml.unvala m, mt)) mdl in
           let rf = if rf then " rec" else "" in
           vlist2 (str_module ("module" ^ rf)) (str_module "and") pc mdl
-      | <:str_item< module type $uid:m$ = $mt$ >> ->
+      | <:str_item< module type $m$ = $mt$ >> ->
           sig_module_or_module_type "module type" '=' pc (m, mt)
       | <:str_item:< open $i$ >> ->
           pprintf pc "open %p" mod_ident (loc, i)
@@ -1647,7 +1647,7 @@ EXTEND_PRINTER
           let rf = if rf then " rec" else "" in
           vlist2 (sig_module_or_module_type ("module" ^ rf) ':')
             (sig_module_or_module_type "and" ':') pc mdl
-      | <:sig_item< module type $uid:m$ = $mt$ >> ->
+      | <:sig_item< module type $m$ = $mt$ >> ->
           sig_module_or_module_type "module type" '=' pc (m, mt)
       | <:sig_item:< open $i$ >> ->
           pprintf pc "open %p" mod_ident (loc, i)
diff --git a/etc/pr_scheme.ml b/etc/pr_scheme.ml
index d7740d4..db43f77 100644
--- a/etc/pr_scheme.ml
+++ b/etc/pr_scheme.ml
@@ -1,5 +1,5 @@
 (* camlp5r *)
-(* $Id: pr_scheme.ml,v 6.8 2012-01-09 14:22:21 deraugla Exp $ *)
+(* $Id: pr_scheme.ml,v 6.9 2013-07-02 16:12:43 deraugla Exp $ *)
 (* Copyright (c) INRIA 2007-2012 *)
 
 #directory ".";
@@ -1081,7 +1081,7 @@ EXTEND_PRINTER
           plistbf 0 (paren pc "module")
             [(fun pc -> sprintf "%s%s%s" pc.bef s pc.aft, "");
              (fun pc -> module_expr pc me, "")]
-      | <:str_item< module type $uid:s$ = $mt$ >> ->
+      | <:str_item< module type $s$ = $mt$ >> ->
           module_type_decl pc (s, mt)
       | <:str_item< external $lid:i$ : $t$ = $list:pd$ >> ->
           plistbf 0 (paren pc "external")
@@ -1124,7 +1124,7 @@ EXTEND_PRINTER
           plistbf 0 (paren pc "module")
             [(fun pc -> sprintf "%s%s%s" pc.bef s pc.aft, "");
              (fun pc -> module_type pc mt, "")]
-      | <:sig_item< module type $uid:s$ = $mt$ >> ->
+      | <:sig_item< module type $s$ = $mt$ >> ->
           module_type_decl pc (s, mt)
       | <:sig_item< open $i$ >> ->
           plistb longident 0 (paren pc "open") [(i, "")]
diff --git a/lib/plexer.ml b/lib/plexer.ml
index 578aa83..199b1f8 100644
--- a/lib/plexer.ml
+++ b/lib/plexer.ml
@@ -1,5 +1,5 @@
 (* camlp5r *)
-(* $Id: plexer.ml,v 6.18 2013-06-14 03:03:31 deraugla Exp $ *)
+(* $Id: plexer.ml,v 6.19 2013-07-03 01:43:10 deraugla Exp $ *)
 (* Copyright (c) INRIA 2007-2012 *)
 
 #load "pa_lexer.cmo";
@@ -435,13 +435,7 @@ value next_token_after_spaces ctx bp =
   | "{:" -> keyword_or_error ctx (bp, $pos) $buf
   | "{" -> keyword_or_error ctx (bp, $pos) $buf
   | ".." -> keyword_or_error ctx (bp, $pos) ".."
-  | ".\n" -> do {
-      incr Plexing.line_nb.val;
-      Plexing.bol_pos.val.val := $pos;
-      ctx.set_line_nb ();
-      ctx.after_space := True;
-      keyword_or_error ctx (bp, bp + 1) ctx.dot_newline_is
-    }
+  | "." ?= [ "\n" ] -> keyword_or_error ctx (bp, bp + 1) ctx.dot_newline_is
   | "." ->
       let id =
         if ctx.specific_space_dot && ctx.after_space then " ." else "."
diff --git a/main/mLast.mli b/main/mLast.mli
index 4badf2d..4b932a6 100644
--- a/main/mLast.mli
+++ b/main/mLast.mli
@@ -1,5 +1,5 @@
 (* camlp5r *)
-(* $Id: mLast.mli,v 6.25 2012-03-09 14:54:20 deraugla Exp $ *)
+(* $Id: mLast.mli,v 6.26 2013-07-02 16:31:25 deraugla Exp $ *)
 (* Copyright (c) INRIA 2007-2012 *)
 
 #load "pa_macro.cmo";
@@ -237,6 +237,7 @@ external loc_of_module_type : module_type -> loc = "%field0";
 external loc_of_module_expr : module_expr -> loc = "%field0";
 external loc_of_sig_item : sig_item -> loc = "%field0";
 external loc_of_str_item : str_item -> loc = "%field0";
+external loc_of_with_constr : with_constr -> loc = "%field0";
 
 external loc_of_class_type : class_type -> loc = "%field0";
 external loc_of_class_sig_item : class_sig_item -> loc = "%field0";
diff --git a/main/pcaml.ml b/main/pcaml.ml
index f9e8ef0..980b668 100644
--- a/main/pcaml.ml
+++ b/main/pcaml.ml
@@ -1,5 +1,5 @@
 (* camlp5r *)
-(* $Id: pcaml.ml,v 6.43 2013-06-19 02:17:42 deraugla Exp $ *)
+(* $Id: pcaml.ml,v 6.45 2013-08-15 22:08:21 deraugla Exp $ *)
 (* Copyright (c) INRIA 2007-2012 *)
 
 #load "pa_macro.cmo";
@@ -7,7 +7,7 @@
 
 open Printf;
 
-value version = "6.10";
+value version = "6.11";
 value syntax_name = ref "";
 
 value gram =
diff --git a/meta/pa_r.ml b/meta/pa_r.ml
index 883161e..cd6c780 100644
--- a/meta/pa_r.ml
+++ b/meta/pa_r.ml
@@ -1,5 +1,5 @@
 (* camlp5r *)
-(* $Id: pa_r.ml,v 6.47 2013-06-14 03:03:31 deraugla Exp $ *)
+(* $Id: pa_r.ml,v 6.48 2013-07-02 16:12:43 deraugla Exp $ *)
 (* Copyright (c) INRIA 2007-2012 *)
 
 #load "pa_extend.cmo";
@@ -175,8 +175,8 @@ EXTEND
       | "include"; me = module_expr -> <:str_item< include $me$ >>
       | "module"; r = V (FLAG "rec"); l = V (LIST1 mod_binding SEP "and") ->
           <:str_item< module $_flag:r$ $_list:l$ >>
-      | "module"; "type"; i = V UIDENT "uid" ""; mt = mod_type_fun_binding ->
-          <:str_item< module type $_uid:i$ = $mt$ >>
+      | "module"; "type"; i = V ident ""; mt = mod_type_fun_binding ->
+          <:str_item< module type $_:i$ = $mt$ >>
       | "open"; i = V mod_ident "list" "" -> <:str_item< open $_:i$ >>
       | "type"; tdl = V (LIST1 type_decl SEP "and") ->
           <:str_item< type $_list:tdl$ >>
@@ -243,8 +243,8 @@ EXTEND
       | "module"; rf = V (FLAG "rec");
         l = V (LIST1 mod_decl_binding SEP "and") ->
           <:sig_item< module $_flag:rf$ $_list:l$ >>
-      | "module"; "type"; i = V UIDENT "uid" ""; "="; mt = module_type ->
-          <:sig_item< module type $_uid:i$ = $mt$ >>
+      | "module"; "type"; i = V ident ""; "="; mt = module_type ->
+          <:sig_item< module type $_:i$ = $mt$ >>
       | "open"; i = V mod_ident "list" "" -> <:sig_item< open $_:i$ >>
       | "type"; tdl = V (LIST1 type_decl SEP "and") ->
           <:sig_item< type $_list:tdl$ >>
diff --git a/meta/q_MLast.ml b/meta/q_MLast.ml
index b1a51c7..32756ed 100644
--- a/meta/q_MLast.ml
+++ b/meta/q_MLast.ml
@@ -1,5 +1,5 @@
 (* camlp5r *)
-(* $Id: q_MLast.ml,v 6.42 2013-04-20 03:33:21 deraugla Exp $ *)
+(* $Id: q_MLast.ml,v 6.43 2013-07-02 16:12:43 deraugla Exp $ *)
 (* Copyright (c) INRIA 2007-2012 *)
 
 #load "pa_extend.cmo";
@@ -319,7 +319,7 @@ EXTEND
       | "include"; me = module_expr -> Qast.Node "StInc" [Qast.Loc; me]
       | "module"; r = SV (FLAG "rec"); l = SV (LIST1 mod_binding SEP "and") ->
           Qast.Node "StMod" [Qast.Loc; r; l]
-      | "module"; "type"; i = SV UIDENT; mt = mod_type_fun_binding ->
+      | "module"; "type"; i = SV ident ""; mt = mod_type_fun_binding ->
           Qast.Node "StMty" [Qast.Loc; i; mt]
       | "open"; i = SV mod_ident "list" "" -> Qast.Node "StOpn" [Qast.Loc; i]
       | "type"; tdl = SV (LIST1 type_decl SEP "and") ->
@@ -390,7 +390,7 @@ EXTEND
       | "module"; rf = SV (FLAG "rec");
         l = SV (LIST1 mod_decl_binding SEP "and") ->
           Qast.Node "SgMod" [Qast.Loc; rf; l]
-      | "module"; "type"; i = SV UIDENT; "="; mt = module_type ->
+      | "module"; "type"; i = SV ident ""; "="; mt = module_type ->
           Qast.Node "SgMty" [Qast.Loc; i; mt]
       | "open"; i = SV mod_ident "list" "" -> Qast.Node "SgOpn" [Qast.Loc; i]
       | "type"; tdl = SV (LIST1 type_decl SEP "and") ->
diff --git a/ocaml_src/lib/plexer.ml b/ocaml_src/lib/plexer.ml
index 3dccea1..56e176b 100644
--- a/ocaml_src/lib/plexer.ml
+++ b/ocaml_src/lib/plexer.ml
@@ -986,19 +986,17 @@ let next_token_after_spaces ctx bp buf (strm__ : _ Stream.t) =
                     Some '.' ->
                       Stream.junk strm__;
                       keyword_or_error ctx (bp, Stream.count strm__) ".."
-                  | Some '\n' ->
-                      Stream.junk strm__;
-                      incr !(Plexing.line_nb);
-                      !(Plexing.bol_pos) := Stream.count strm__;
-                      ctx.set_line_nb ();
-                      ctx.after_space <- true;
-                      keyword_or_error ctx (bp, bp + 1) ctx.dot_newline_is
                   | _ ->
-                      let id =
-                        if ctx.specific_space_dot && ctx.after_space then " ."
-                        else "."
-                      in
-                      keyword_or_error ctx (bp, Stream.count strm__) id
+                      match Stream.npeek 1 strm__ with
+                        ['\n'] ->
+                          keyword_or_error ctx (bp, bp + 1) ctx.dot_newline_is
+                      | _ ->
+                          let id =
+                            if ctx.specific_space_dot && ctx.after_space then
+                              " ."
+                            else "."
+                          in
+                          keyword_or_error ctx (bp, Stream.count strm__) id
                   end
               | Some ';' ->
                   Stream.junk strm__;
@@ -1445,15 +1443,15 @@ let gmake () =
   let glexr =
     ref
       {Plexing.tok_func =
-        (fun _ -> raise (Match_failure ("plexer.ml", 754, 25)));
+        (fun _ -> raise (Match_failure ("plexer.ml", 748, 25)));
        Plexing.tok_using =
-         (fun _ -> raise (Match_failure ("plexer.ml", 754, 45)));
+         (fun _ -> raise (Match_failure ("plexer.ml", 748, 45)));
        Plexing.tok_removing =
-         (fun _ -> raise (Match_failure ("plexer.ml", 754, 68)));
+         (fun _ -> raise (Match_failure ("plexer.ml", 748, 68)));
        Plexing.tok_match =
-         (fun _ -> raise (Match_failure ("plexer.ml", 755, 18)));
+         (fun _ -> raise (Match_failure ("plexer.ml", 749, 18)));
        Plexing.tok_text =
-         (fun _ -> raise (Match_failure ("plexer.ml", 755, 37)));
+         (fun _ -> raise (Match_failure ("plexer.ml", 749, 37)));
        Plexing.tok_comm = None}
   in
   let glex =
diff --git a/ocaml_src/main/mLast.mli b/ocaml_src/main/mLast.mli
index caa1ad4..ca4dfaf 100644
--- a/ocaml_src/main/mLast.mli
+++ b/ocaml_src/main/mLast.mli
@@ -228,6 +228,7 @@ external loc_of_module_type : module_type -> loc = "%field0";;
 external loc_of_module_expr : module_expr -> loc = "%field0";;
 external loc_of_sig_item : sig_item -> loc = "%field0";;
 external loc_of_str_item : str_item -> loc = "%field0";;
+external loc_of_with_constr : with_constr -> loc = "%field0";;
 
 external loc_of_class_type : class_type -> loc = "%field0";;
 external loc_of_class_sig_item : class_sig_item -> loc = "%field0";;
diff --git a/ocaml_src/main/pcaml.ml b/ocaml_src/main/pcaml.ml
index dc19881..0bffb4b 100644
--- a/ocaml_src/main/pcaml.ml
+++ b/ocaml_src/main/pcaml.ml
@@ -7,7 +7,7 @@
 
 open Printf;;
 
-let version = "6.10";;
+let version = "6.11";;
 let syntax_name = ref "";;
 
 let gram =
diff --git a/ocaml_src/meta/pa_r.ml b/ocaml_src/meta/pa_r.ml
index 160e845..c6e2a05 100644
--- a/ocaml_src/meta/pa_r.ml
+++ b/ocaml_src/meta/pa_r.ml
@@ -372,12 +372,12 @@ Grammar.extend
         (fun (i : 'mod_ident) _ (loc : Ploc.t) ->
            (MLast.StOpn (loc, i) : 'str_item));
       [Gramext.Stoken ("", "module"); Gramext.Stoken ("", "type");
-       Gramext.Stoken ("UIDENT", "");
+       Gramext.Snterm (Grammar.Entry.obj (ident : 'ident Grammar.Entry.e));
        Gramext.Snterm
          (Grammar.Entry.obj
             (mod_type_fun_binding : 'mod_type_fun_binding Grammar.Entry.e))],
       Gramext.action
-        (fun (mt : 'mod_type_fun_binding) (i : string) _ _ (loc : Ploc.t) ->
+        (fun (mt : 'mod_type_fun_binding) (i : 'ident) _ _ (loc : Ploc.t) ->
            (MLast.StMty (loc, i, mt) : 'str_item));
       [Gramext.Stoken ("", "module");
        Gramext.Sflag (Gramext.Stoken ("", "rec"));
@@ -598,11 +598,12 @@ Grammar.extend
         (fun (i : 'mod_ident) _ (loc : Ploc.t) ->
            (MLast.SgOpn (loc, i) : 'sig_item));
       [Gramext.Stoken ("", "module"); Gramext.Stoken ("", "type");
-       Gramext.Stoken ("UIDENT", ""); Gramext.Stoken ("", "=");
+       Gramext.Snterm (Grammar.Entry.obj (ident : 'ident Grammar.Entry.e));
+       Gramext.Stoken ("", "=");
        Gramext.Snterm
          (Grammar.Entry.obj (module_type : 'module_type Grammar.Entry.e))],
       Gramext.action
-        (fun (mt : 'module_type) _ (i : string) _ _ (loc : Ploc.t) ->
+        (fun (mt : 'module_type) _ (i : 'ident) _ _ (loc : Ploc.t) ->
            (MLast.SgMty (loc, i, mt) : 'sig_item));
       [Gramext.Stoken ("", "module");
        Gramext.Sflag (Gramext.Stoken ("", "rec"));
diff --git a/ocaml_src/meta/q_MLast.ml b/ocaml_src/meta/q_MLast.ml
index b17cdd7..3bcf939 100644
--- a/ocaml_src/meta/q_MLast.ml
+++ b/ocaml_src/meta/q_MLast.ml
@@ -771,10 +771,10 @@ Grammar.extend
       [Gramext.Stoken ("", "module"); Gramext.Stoken ("", "type");
        Gramext.Sfacto
          (Gramext.srules
-            [[Gramext.Stoken ("UIDENT", "")],
+            [[Gramext.Snterm
+                (Grammar.Entry.obj (ident : 'ident Grammar.Entry.e))],
              Gramext.action
-               (fun (a : string) (loc : Ploc.t) ->
-                  (Qast.VaVal (Qast.Str a) : 'e__11));
+               (fun (a : 'ident) (loc : Ploc.t) -> (Qast.VaVal a : 'e__11));
              [Gramext.Stoken ("ANTIQUOT", "_")],
              Gramext.action
                (fun (a : string) (loc : Ploc.t) ->
@@ -782,15 +782,7 @@ Grammar.extend
              [Gramext.Stoken ("ANTIQUOT", "")],
              Gramext.action
                (fun (a : string) (loc : Ploc.t) ->
-                  (Qast.VaVal (Qast.VaAnt ("", loc, a)) : 'e__11));
-             [Gramext.Stoken ("ANTIQUOT", "_uid")],
-             Gramext.action
-               (fun (a : string) (loc : Ploc.t) ->
-                  (Qast.VaAnt ("_uid", loc, a) : 'e__11));
-             [Gramext.Stoken ("ANTIQUOT", "uid")],
-             Gramext.action
-               (fun (a : string) (loc : Ploc.t) ->
-                  (Qast.VaVal (Qast.VaAnt ("uid", loc, a)) : 'e__11))]);
+                  (Qast.VaVal (Qast.VaAnt ("", loc, a)) : 'e__11))]);
        Gramext.Snterm
          (Grammar.Entry.obj
             (mod_type_fun_binding : 'mod_type_fun_binding Grammar.Entry.e))],
@@ -1426,10 +1418,10 @@ Grammar.extend
       [Gramext.Stoken ("", "module"); Gramext.Stoken ("", "type");
        Gramext.Sfacto
          (Gramext.srules
-            [[Gramext.Stoken ("UIDENT", "")],
+            [[Gramext.Snterm
+                (Grammar.Entry.obj (ident : 'ident Grammar.Entry.e))],
              Gramext.action
-               (fun (a : string) (loc : Ploc.t) ->
-                  (Qast.VaVal (Qast.Str a) : 'e__38));
+               (fun (a : 'ident) (loc : Ploc.t) -> (Qast.VaVal a : 'e__38));
              [Gramext.Stoken ("ANTIQUOT", "_")],
              Gramext.action
                (fun (a : string) (loc : Ploc.t) ->
@@ -1437,15 +1429,7 @@ Grammar.extend
              [Gramext.Stoken ("ANTIQUOT", "")],
              Gramext.action
                (fun (a : string) (loc : Ploc.t) ->
-                  (Qast.VaVal (Qast.VaAnt ("", loc, a)) : 'e__38));
-             [Gramext.Stoken ("ANTIQUOT", "_uid")],
-             Gramext.action
-               (fun (a : string) (loc : Ploc.t) ->
-                  (Qast.VaAnt ("_uid", loc, a) : 'e__38));
-             [Gramext.Stoken ("ANTIQUOT", "uid")],
-             Gramext.action
-               (fun (a : string) (loc : Ploc.t) ->
-                  (Qast.VaVal (Qast.VaAnt ("uid", loc, a)) : 'e__38))]);
+                  (Qast.VaVal (Qast.VaAnt ("", loc, a)) : 'e__38))]);
        Gramext.Stoken ("", "=");
        Gramext.Snterm
          (Grammar.Entry.obj (module_type : 'module_type Grammar.Entry.e))],
diff --git a/ocaml_stuff/4.01.0/utils/warnings.mli b/ocaml_stuff/4.01.0/utils/warnings.mli
index c8a75d9..fa48065 100644
--- a/ocaml_stuff/4.01.0/utils/warnings.mli
+++ b/ocaml_stuff/4.01.0/utils/warnings.mli
@@ -58,6 +58,7 @@ type t =
   | Nonoptional_label of string             (* 43 *)
   | Open_shadow_identifier of string * string (* 44 *)
   | Open_shadow_label_constructor of string * string (* 45 *)
+  | Bad_env_variable of string * string
 ;;
 
 val parse_options : bool -> string -> unit;;
diff --git a/top/rprint.ml b/top/rprint.ml
index 5c0be75..b9068a2 100644
--- a/top/rprint.ml
+++ b/top/rprint.ml
@@ -1,5 +1,5 @@
 (* camlp5r pa_macro.cmo *)
-(* $Id: rprint.ml,v 6.16 2012-03-02 18:49:57 deraugla Exp $ *)
+(* $Id: rprint.ml,v 6.17 2013-07-02 16:27:48 deraugla Exp $ *)
 (* Copyright (c) INRIA 2007-2012 *)
 
 IFDEF OCAML_VERSION >= OCAML_3_03 THEN
@@ -394,7 +394,7 @@ and print_out_sig_item ppf =
   [ Osig_exception id tyl ->
       fprintf ppf "@[<2>exception %a@]" print_out_constr (id, tyl)
   | Osig_modtype name Omty_abstract ->
-      fprintf ppf "@[<2>module type %s@]" name
+      fprintf ppf "@[<2>module type %s = 'a@]" name
   | Osig_modtype name mty ->
       fprintf ppf "@[<2>module type %s =@ %a@]" name print_out_module_type mty
   | IFDEF OCAML_VERSION <= OCAML_3_07 THEN

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



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