Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] OCaml+spacetime crashes during camlp5 compilation
Date: Sun, 19 Feb 2017 09:43:54 +0100	[thread overview]
Message-ID: <20170219084354.GA12744@yquem.inria.fr> (raw)
In-Reply-To: <CAGmVoG1c8qXsSytHU_Vf+eEn3+uuujm+EfkigDNz5RSi+8+0uw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 536 bytes --]

Hi,

On Sun, Feb 19, 2017 at 10:34:23AM +0300, Kakadu wrote:

> Can you send me a diff of your splitting? I tried to do this but is
> seems that I only introduced some bugs....

Included. But now, I am not sure that the problem really comes from
this EXTEND.

BTW, I found a bug about locations on error messages (giving <none>
as source file and no location). People should pull the new version
of Camlp5 on github. (This bug is independent from the compilation of
q_MLast.cmo.)

--
Daniel de Rauglaudre
http://pauillac.inria.fr/~ddr/

[-- Attachment #2: q_MLast.ml.diff --]
[-- Type: text/x-diff, Size: 3331 bytes --]

diff --git a/meta/q_MLast.ml b/meta/q_MLast.ml
index c0d54de..5558684 100644
--- a/meta/q_MLast.ml
+++ b/meta/q_MLast.ml
@@ -158,8 +158,13 @@ value class_str_item = Grammar.Entry.create gram "class_str_item";
 
 value ipatt = Grammar.Entry.create gram "ipatt";
 value let_binding = Grammar.Entry.create gram "let_binding";
+value fun_binding = Grammar.Entry.create gram "fun_binding";
 value type_decl = Grammar.Entry.create gram "type_decl";
+value type_parameter = Grammar.Entry.create gram "type_parameter";
 value match_case = Grammar.Entry.create gram "match_case";
+value ident = Grammar.Entry.create gram "ident";
+value mod_ident = Grammar.Entry.create gram "mod_ident";
+value patt_label_ident = Grammar.Entry.create gram "patt_label_ident";
 value constructor_declaration =
   Grammar.Entry.create gram "constructor_declaration";
 value label_declaration =
@@ -280,7 +285,8 @@ EXTEND
   GLOBAL: sig_item str_item ctyp patt expr module_type module_expr signature
     structure class_type class_expr class_sig_item class_str_item let_binding
     type_decl constructor_declaration label_declaration match_case ipatt
-    with_constr poly_variant;
+    with_constr poly_variant ident mod_ident fun_binding type_parameter
+    patt_label_ident;
   module_expr:
     [ [ "functor"; "("; i = SV UIDENT; ":"; t = module_type; ")"; "->";
         me = SELF ->
@@ -803,6 +809,18 @@ EXTEND
                (Qast.List [Qast.Tuple [p; Qast.VaVal (Qast.Option None); e]])]
       | "->"; e = expr -> e ] ]
   ;
+  direction_flag:
+    [ [ "to" -> Qast.Bool True
+      | "downto" -> Qast.Bool False ] ]
+  ;
+END;
+
+EXTEND
+  GLOBAL: sig_item str_item ctyp patt expr module_type module_expr signature
+    structure class_type class_expr class_sig_item class_str_item let_binding
+    type_decl constructor_declaration label_declaration match_case ipatt
+    with_constr poly_variant ident mod_ident fun_binding type_parameter
+    patt_label_ident;
   patt:
     [ LEFTA
       [ p1 = SELF; "|"; p2 = SELF -> Qast.Node "PaOrp" [Qast.Loc; p1; p2] ]
@@ -984,13 +1002,17 @@ EXTEND
       | i = LIDENT -> Qast.List [mkident i]
       | i = UIDENT; "."; j = SELF -> Qast.Cons (mkident i) j ] ]
   ;
-  direction_flag:
-    [ [ "to" -> Qast.Bool True
-      | "downto" -> Qast.Bool False ] ]
-  ;
   typevar:
     [ [ "'"; i = ident -> i ] ]
   ;
+END;
+
+EXTEND
+  GLOBAL: sig_item str_item ctyp patt expr module_type module_expr signature
+    structure class_type class_expr class_sig_item class_str_item let_binding
+    type_decl constructor_declaration label_declaration match_case ipatt
+    with_constr poly_variant ident mod_ident fun_binding type_parameter
+    patt_label_ident;
   (* Objects and Classes *)
   str_item:
     [ [ "class"; cd = SV (LIST1 class_declaration SEP "and") ->
@@ -1183,6 +1205,14 @@ EXTEND
     [ [ m = UIDENT; "."; l = SELF -> Qast.Cons (mkident m) l
       | i = LIDENT -> Qast.List [mkident i] ] ]
   ;
+END;
+
+EXTEND
+  GLOBAL: sig_item str_item ctyp patt expr module_type module_expr signature
+    structure class_type class_expr class_sig_item class_str_item let_binding
+    type_decl constructor_declaration label_declaration match_case ipatt
+    with_constr poly_variant ident mod_ident fun_binding type_parameter
+    patt_label_ident;
   (* Labels *)
   ctyp: AFTER "arrow"
     [ NONA

      reply	other threads:[~2017-02-19  8:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17 22:00 Kakadu
2017-02-18  1:53 ` Daniel de Rauglaudre
2017-02-18  1:58   ` Gabriel Scherer
2017-02-18  7:39     ` Kakadu
2017-02-18  8:49       ` Leo White
2017-02-18 10:31         ` Daniel de Rauglaudre
2017-02-18 11:17           ` Kakadu
2017-02-18 20:52           ` Gerd Stolpmann
2017-02-18 21:02             ` Kakadu
2017-02-18 21:14               ` Kakadu
2017-02-19  3:00             ` Daniel de Rauglaudre
2017-02-19  7:34               ` Kakadu
2017-02-19  8:43                 ` Daniel de Rauglaudre [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170219084354.GA12744@yquem.inria.fr \
    --to=daniel.de_rauglaudre@inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox