]> git.pld-linux.org Git - packages/ocaml.git/blob - ocaml-camlp4-labl-fix.patch
f3632017078383855f5515fb0f7bb1baa96c5d80
[packages/ocaml.git] / ocaml-camlp4-labl-fix.patch
1 Index: camlp4/camlp4/ast2pt.ml
2 ===================================================================
3 RCS file: /net/pauillac/caml/repository/csl/camlp4/camlp4/ast2pt.ml,v
4 retrieving revision 1.25
5 retrieving revision 1.26
6 diff -u -r1.25 -r1.26
7 --- camlp4/camlp4/ast2pt.ml     2003/07/16 18:59:12     1.25
8 +++ camlp4/camlp4/ast2pt.ml     2003/09/30 14:39:26     1.26
9 @@ -10,7 +10,7 @@
10  (*                                                                     *)
11  (***********************************************************************)
12  
13 -(* $Id$ *)
14 +(* $Id$ *)
15  
16  open Stdpp;
17  open MLast;
18 @@ -177,10 +177,10 @@
19    | TyObj loc fl v -> mktyp loc (Ptyp_object (meth_list loc fl v))
20    | TyCls loc id ->
21        mktyp loc (Ptyp_class (long_id_of_string_list loc id) [] [])
22 -  | TyLab loc _ _ -> error loc "labeled type not allowed here"
23 +  | TyLab loc _ _ -> error loc "labelled type not allowed here"
24    | TyLid loc s -> mktyp loc (Ptyp_constr (lident s) [])
25 -  | TyMan loc _ _ -> error loc "type manifest not allowed here"
26 -  | TyOlb loc lab _ -> error loc "labeled type not allowed here"
27 +  | TyMan loc _ _ -> error loc "manifest type not allowed here"
28 +  | TyOlb loc lab _ -> error loc "labelled type not allowed here"
29    | TyPol loc pl t -> mktyp loc (Ptyp_poly pl (ctyp t))
30    | TyQuo loc s -> mktyp loc (Ptyp_var s)
31    | TyRec loc _ _ -> error loc "record type not allowed here"
32 Index: camlp4/etc/pa_o.ml
33 ===================================================================
34 RCS file: /net/pauillac/caml/repository/csl/camlp4/etc/pa_o.ml,v
35 retrieving revision 1.52
36 retrieving revision 1.54
37 diff -u -r1.52 -r1.54
38 --- camlp4/etc/pa_o.ml  2003/09/25 12:05:05     1.52
39 +++ camlp4/etc/pa_o.ml  2003/09/30 14:39:38     1.54
40 @@ -10,7 +10,7 @@
41  (*                                                                     *)
42  (***********************************************************************)
43  
44 -(* $Id$ *)
45 +(* $Id$ *)
46  
47  open Stdpp;
48  open Pcaml;
49 @@ -1148,16 +1148,16 @@
50        | i = LIDENT -> [i] ] ]
51    ;
52    (* Labels *)
53 -  ctyp: AFTER "arrow"
54 -    [ NONA
55 +  ctyp: LEVEL "arrow"
56 +    [ RIGHTA
57        [ i = lident_colon; t1 = ctyp LEVEL "star"; "->"; t2 = SELF ->
58 -          <:ctyp< ~ $i$ : $t1$ -> $t2$ >>
59 +          <:ctyp< ( ~ $i$ : $t1$ ) -> $t2$ >>
60        | i = OPTLABEL; t1 = ctyp LEVEL "star"; "->"; t2 = SELF ->
61 -          <:ctyp< ? $i$ : $t1$ -> $t2$ >>
62 +          <:ctyp< ( ? $i$ : $t1$ ) -> $t2$ >>
63        | i = QUESTIONIDENT; ":"; t1 = ctyp LEVEL "star"; "->"; t2 = SELF ->
64 -          <:ctyp< ? $i$ : $t1$ -> $t2$ >>
65 +          <:ctyp< ( ? $i$ : $t1$ ) -> $t2$ >>
66        | "?"; i=lident_colon;t1 = ctyp LEVEL "star"; "->"; t2 = SELF ->
67 -          <:ctyp< ? $i$ : $t1$ -> $t2$ >> ] ]
68 +          <:ctyp< ( ? $i$ : $t1$ ) -> $t2$ >> ] ]
69    ;
70    ctyp: LEVEL "simple"
71      [ [ "["; OPT "|"; rfl = LIST1 row_field SEP "|"; "]" ->
72 Index: camlp4/meta/pa_r.ml
73 ===================================================================
74 RCS file: /net/pauillac/caml/repository/csl/camlp4/meta/pa_r.ml,v
75 retrieving revision 1.53
76 retrieving revision 1.54
77 diff -u -r1.53 -r1.54
78 --- camlp4/meta/pa_r.ml 2003/09/25 12:05:06     1.53
79 +++ camlp4/meta/pa_r.ml 2003/09/30 10:20:06     1.54
80 @@ -10,7 +10,7 @@
81  (*                                                                     *)
82  (***********************************************************************)
83  
84 -(* $Id$ *)
85 +(* $Id$ *)
86  
87  open Stdpp;
88  open Pcaml;
89 @@ -748,8 +748,8 @@
90        | i = LIDENT -> [i] ] ]
91    ;
92    (* Labels *)
93 -  ctyp: AFTER "arrow"
94 -    [ NONA
95 +  ctyp: LEVEL "arrow"
96 +    [ RIGHTA
97        [ i = TILDEIDENT; ":"; t = SELF -> <:ctyp< ~ $i$ : $t$ >>
98        | i = LABEL; t = SELF -> <:ctyp< ~ $i$ : $t$ >>
99        | i = QUESTIONIDENT; ":"; t = SELF -> <:ctyp< ? $i$ : $t$ >> 
100 Index: camlp4/meta/q_MLast.ml
101 ===================================================================
102 RCS file: /net/pauillac/caml/repository/csl/camlp4/meta/q_MLast.ml,v
103 retrieving revision 1.51
104 retrieving revision 1.52
105 diff -u -r1.51 -r1.52
106 --- camlp4/meta/q_MLast.ml      2003/07/16 12:50:08     1.51
107 +++ camlp4/meta/q_MLast.ml      2003/09/30 11:38:04     1.52
108 @@ -10,7 +10,7 @@
109  (*                                                                     *)
110  (***********************************************************************)
111  
112 -(* $Id$ *)
113 +(* $Id$ *)
114  
115  value gram = Grammar.gcreate (Plexer.gmake ());
116  
117 @@ -127,7 +127,9 @@
118  value a_STRING = Grammar.Entry.create gram "a_STRING";
119  value a_CHAR = Grammar.Entry.create gram "a_CHAR";
120  value a_TILDEIDENT = Grammar.Entry.create gram "a_TILDEIDENT";
121 +value a_LABEL = Grammar.Entry.create gram "a_LABEL";
122  value a_QUESTIONIDENT = Grammar.Entry.create gram "a_QUESTIONIDENT";
123 +value a_OPTLABEL = Grammar.Entry.create gram "a_OPTLABEL";
124  
125  value o2b =
126    fun
127 @@ -1007,10 +1009,13 @@
128        | i = a_LIDENT -> Qast.List [i] ] ]
129    ;
130    (* Labels *)
131 -  ctyp: AFTER "arrow"
132 -    [ NONA
133 +  ctyp: LEVEL "arrow"
134 +    [ RIGHTA
135        [ i = a_TILDEIDENT; ":"; t = SELF -> Qast.Node "TyLab" [Qast.Loc; i; t]
136 +      | i = a_LABEL; t = SELF -> Qast.Node "TyLab" [Qast.Loc; i; t]
137        | i = a_QUESTIONIDENT; ":"; t = SELF ->
138 +          Qast.Node "TyOlb" [Qast.Loc; i; t]
139 +      | i = a_OPTLABEL; t = SELF ->
140            Qast.Node "TyOlb" [Qast.Loc; i; t] ] ]
141    ;
142    ctyp: LEVEL "simple"
143 @@ -1044,11 +1049,16 @@
144        | "#"; sl = mod_ident -> Qast.Node "PaTyp" [Qast.Loc; sl]
145        | i = a_TILDEIDENT; ":"; p = SELF ->
146            Qast.Node "PaLab" [Qast.Loc; i; Qast.Option (Some p)]
147 +      | i = a_LABEL; p = SELF ->
148 +          Qast.Node "PaLab" [Qast.Loc; i; Qast.Option (Some p)]
149        | i = a_TILDEIDENT -> Qast.Node "PaLab" [Qast.Loc; i; Qast.Option None]
150        | i = a_QUESTIONIDENT; ":"; "("; p = patt_tcon; eo = SOPT eq_expr;
151          ")" ->
152            Qast.Node "PaOlb"
153              [Qast.Loc; i; Qast.Option (Some (Qast.Tuple [p; eo]))]
154 +      | i = a_OPTLABEL; "("; p = patt_tcon; eo = SOPT eq_expr; ")" ->
155 +          Qast.Node "PaOlb"
156 +            [Qast.Loc; i; Qast.Option (Some (Qast.Tuple [p; eo]))]
157        | i = a_QUESTIONIDENT ->
158            Qast.Node "PaOlb" [Qast.Loc; i; Qast.Option None]
159        | "?"; "("; p = patt_tcon; eo = SOPT eq_expr; ")" ->
160 @@ -1063,11 +1073,16 @@
161    ipatt:
162      [ [ i = a_TILDEIDENT; ":"; p = SELF ->
163            Qast.Node "PaLab" [Qast.Loc; i; Qast.Option (Some p)]
164 +      | i = a_LABEL; p = SELF ->
165 +          Qast.Node "PaLab" [Qast.Loc; i; Qast.Option (Some p)]
166        | i = a_TILDEIDENT -> Qast.Node "PaLab" [Qast.Loc; i; Qast.Option None]
167        | i = a_QUESTIONIDENT; ":"; "("; p = ipatt_tcon; eo = SOPT eq_expr;
168          ")" ->
169            Qast.Node "PaOlb"
170              [Qast.Loc; i; Qast.Option (Some (Qast.Tuple [p; eo]))]
171 +      | i = a_OPTLABEL; "("; p = ipatt_tcon; eo = SOPT eq_expr; ")" ->
172 +          Qast.Node "PaOlb"
173 +            [Qast.Loc; i; Qast.Option (Some (Qast.Tuple [p; eo]))]
174        | i = a_QUESTIONIDENT ->
175            Qast.Node "PaOlb" [Qast.Loc; i; Qast.Option None]
176        | "?"; "("; p = ipatt_tcon; eo = SOPT eq_expr; ")" ->
177 @@ -1086,9 +1101,13 @@
178      [ "label" NONA
179        [ i = a_TILDEIDENT; ":"; e = SELF ->
180            Qast.Node "ExLab" [Qast.Loc; i; Qast.Option (Some e)]
181 +      | i = a_LABEL; e = SELF ->
182 +          Qast.Node "ExLab" [Qast.Loc; i; Qast.Option (Some e)]
183        | i = a_TILDEIDENT -> Qast.Node "ExLab" [Qast.Loc; i; Qast.Option None]
184        | i = a_QUESTIONIDENT; ":"; e = SELF ->
185            Qast.Node "ExOlb" [Qast.Loc; i; Qast.Option (Some e)]
186 +      | i = a_OPTLABEL; e = SELF ->
187 +          Qast.Node "ExOlb" [Qast.Loc; i; Qast.Option (Some e)]
188        | i = a_QUESTIONIDENT ->
189            Qast.Node "ExOlb" [Qast.Loc; i; Qast.Option None] ] ]
190    ;
191 @@ -1335,9 +1354,15 @@
192      [ [ "~"; a = ANTIQUOT -> antiquot "" loc a
193        | s = TILDEIDENT -> Qast.Str s ] ]
194    ;
195 +  a_LABEL:
196 +    [ [ s = LABEL -> Qast.Str s ] ]
197 +  ;
198    a_QUESTIONIDENT:
199      [ [ "?"; a = ANTIQUOT -> antiquot "" loc a
200        | s = QUESTIONIDENT -> Qast.Str s ] ]
201 +  ;
202 +  a_OPTLABEL:
203 +    [ [ s = OPTLABEL -> Qast.Str s ] ]
204    ;
205  END;
206  
207 Index: camlp4/ocaml_src/camlp4/ast2pt.ml
208 ===================================================================
209 RCS file: /net/pauillac/caml/repository/csl/camlp4/ocaml_src/camlp4/ast2pt.ml,v
210 retrieving revision 1.24
211 retrieving revision 1.25
212 diff -u -r1.24 -r1.25
213 --- camlp4/ocaml_src/camlp4/ast2pt.ml   2003/07/23 22:26:18     1.24
214 +++ camlp4/ocaml_src/camlp4/ast2pt.ml   2003/09/30 14:39:38     1.25
215 @@ -169,10 +169,10 @@
216    | TyObj (loc, fl, v) -> mktyp loc (Ptyp_object (meth_list loc fl v))
217    | TyCls (loc, id) ->
218        mktyp loc (Ptyp_class (long_id_of_string_list loc id, [], []))
219 -  | TyLab (loc, _, _) -> error loc "labeled type not allowed here"
220 +  | TyLab (loc, _, _) -> error loc "labelled type not allowed here"
221    | TyLid (loc, s) -> mktyp loc (Ptyp_constr (lident s, []))
222 -  | TyMan (loc, _, _) -> error loc "type manifest not allowed here"
223 -  | TyOlb (loc, lab, _) -> error loc "labeled type not allowed here"
224 +  | TyMan (loc, _, _) -> error loc "manifest type not allowed here"
225 +  | TyOlb (loc, lab, _) -> error loc "labelled type not allowed here"
226    | TyPol (loc, pl, t) -> mktyp loc (Ptyp_poly (pl, ctyp t))
227    | TyQuo (loc, s) -> mktyp loc (Ptyp_var s)
228    | TyRec (loc, _, _) -> error loc "record type not allowed here"
229 Index: camlp4/ocaml_src/meta/pa_r.ml
230 ===================================================================
231 RCS file: /net/pauillac/caml/repository/csl/camlp4/ocaml_src/meta/pa_r.ml,v
232 retrieving revision 1.48
233 retrieving revision 1.49
234 diff -u -r1.48 -r1.49
235 --- camlp4/ocaml_src/meta/pa_r.ml       2003/09/25 12:05:07     1.48
236 +++ camlp4/ocaml_src/meta/pa_r.ml       2003/09/30 10:20:06     1.49
237 @@ -2241,8 +2241,8 @@
238          (fun (l : 'class_longident) _ (m : string) (loc : int * int) ->
239             (m :: l : 'class_longident))]];
240      Grammar.Entry.obj (ctyp : 'ctyp Grammar.Entry.e),
241 -    Some (Gramext.After "arrow"),
242 -    [None, Some Gramext.NonA,
243 +    Some (Gramext.Level "arrow"),
244 +    [None, Some Gramext.RightA,
245       [[Gramext.Stoken ("OPTLABEL", ""); Gramext.Sself],
246        Gramext.action
247          (fun (t : 'ctyp) (i : string) (loc : int * int) ->
248 Index: camlp4/ocaml_src/meta/q_MLast.ml
249 ===================================================================
250 RCS file: /net/pauillac/caml/repository/csl/camlp4/ocaml_src/meta/q_MLast.ml,v
251 retrieving revision 1.56
252 retrieving revision 1.57
253 diff -u -r1.56 -r1.57
254 --- camlp4/ocaml_src/meta/q_MLast.ml    2003/07/23 22:26:19     1.56
255 +++ camlp4/ocaml_src/meta/q_MLast.ml    2003/09/30 11:38:04     1.57
256 @@ -153,7 +153,9 @@
257  let a_STRING = Grammar.Entry.create gram "a_STRING";;
258  let a_CHAR = Grammar.Entry.create gram "a_CHAR";;
259  let a_TILDEIDENT = Grammar.Entry.create gram "a_TILDEIDENT";;
260 +let a_LABEL = Grammar.Entry.create gram "a_LABEL";;
261  let a_QUESTIONIDENT = Grammar.Entry.create gram "a_QUESTIONIDENT";;
262 +let a_OPTLABEL = Grammar.Entry.create gram "a_OPTLABEL";;
263  
264  let o2b =
265    function
266 @@ -626,7 +628,7 @@
267                  Qast.Tuple [xx1; xx2; xx3] -> xx1, xx2, xx3
268                | _ ->
269                    match () with
270 -                  _ -> raise (Match_failure ("q_MLast.ml", 300, 19))
271 +                  _ -> raise (Match_failure ("q_MLast.ml", 302, 19))
272              in
273              Qast.Node ("StExc", [Qast.Loc; c; tl; b]) :
274              'str_item));
275 @@ -896,7 +898,7 @@
276                  Qast.Tuple [xx1; xx2; xx3] -> xx1, xx2, xx3
277                | _ ->
278                    match () with
279 -                  _ -> raise (Match_failure ("q_MLast.ml", 358, 19))
280 +                  _ -> raise (Match_failure ("q_MLast.ml", 360, 19))
281              in
282              Qast.Node ("SgExc", [Qast.Loc; c; tl]) :
283              'sig_item));
284 @@ -3345,9 +3347,15 @@
285          (fun (l : 'class_longident) _ (m : 'a_UIDENT) (loc : int * int) ->
286             (Qast.Cons (m, l) : 'class_longident))]];
287      Grammar.Entry.obj (ctyp : 'ctyp Grammar.Entry.e),
288 -    Some (Gramext.After "arrow"),
289 -    [None, Some Gramext.NonA,
290 +    Some (Gramext.Level "arrow"),
291 +    [None, Some Gramext.RightA,
292       [[Gramext.Snterm
293 +         (Grammar.Entry.obj (a_OPTLABEL : 'a_OPTLABEL Grammar.Entry.e));
294 +       Gramext.Sself],
295 +      Gramext.action
296 +        (fun (t : 'ctyp) (i : 'a_OPTLABEL) (loc : int * int) ->
297 +           (Qast.Node ("TyOlb", [Qast.Loc; i; t]) : 'ctyp));
298 +      [Gramext.Snterm
299           (Grammar.Entry.obj
300              (a_QUESTIONIDENT : 'a_QUESTIONIDENT Grammar.Entry.e));
301         Gramext.Stoken ("", ":"); Gramext.Sself],
302 @@ -3355,6 +3363,12 @@
303          (fun (t : 'ctyp) _ (i : 'a_QUESTIONIDENT) (loc : int * int) ->
304             (Qast.Node ("TyOlb", [Qast.Loc; i; t]) : 'ctyp));
305        [Gramext.Snterm
306 +         (Grammar.Entry.obj (a_LABEL : 'a_LABEL Grammar.Entry.e));
307 +       Gramext.Sself],
308 +      Gramext.action
309 +        (fun (t : 'ctyp) (i : 'a_LABEL) (loc : int * int) ->
310 +           (Qast.Node ("TyLab", [Qast.Loc; i; t]) : 'ctyp));
311 +      [Gramext.Snterm
312           (Grammar.Entry.obj (a_TILDEIDENT : 'a_TILDEIDENT Grammar.Entry.e));
313         Gramext.Stoken ("", ":"); Gramext.Sself],
314        Gramext.action
315 @@ -3518,6 +3532,30 @@
316          (fun (i : 'a_QUESTIONIDENT) (loc : int * int) ->
317             (Qast.Node ("PaOlb", [Qast.Loc; i; Qast.Option None]) : 'patt));
318        [Gramext.Snterm
319 +         (Grammar.Entry.obj (a_OPTLABEL : 'a_OPTLABEL Grammar.Entry.e));
320 +       Gramext.Stoken ("", "(");
321 +       Gramext.Snterm
322 +         (Grammar.Entry.obj (patt_tcon : 'patt_tcon Grammar.Entry.e));
323 +       Gramext.srules
324 +         [[Gramext.Sopt
325 +             (Gramext.Snterm
326 +                (Grammar.Entry.obj (eq_expr : 'eq_expr Grammar.Entry.e)))],
327 +          Gramext.action
328 +            (fun (a : 'eq_expr option) (loc : int * int) ->
329 +               (Qast.Option a : 'a_opt));
330 +          [Gramext.Snterm
331 +             (Grammar.Entry.obj (a_opt : 'a_opt Grammar.Entry.e))],
332 +          Gramext.action
333 +            (fun (a : 'a_opt) (loc : int * int) -> (a : 'a_opt))];
334 +       Gramext.Stoken ("", ")")],
335 +      Gramext.action
336 +        (fun _ (eo : 'a_opt) (p : 'patt_tcon) _ (i : 'a_OPTLABEL)
337 +           (loc : int * int) ->
338 +           (Qast.Node
339 +              ("PaOlb",
340 +               [Qast.Loc; i; Qast.Option (Some (Qast.Tuple [p; eo]))]) :
341 +            'patt));
342 +      [Gramext.Snterm
343           (Grammar.Entry.obj
344              (a_QUESTIONIDENT : 'a_QUESTIONIDENT Grammar.Entry.e));
345         Gramext.Stoken ("", ":"); Gramext.Stoken ("", "(");
346 @@ -3548,6 +3586,13 @@
347          (fun (i : 'a_TILDEIDENT) (loc : int * int) ->
348             (Qast.Node ("PaLab", [Qast.Loc; i; Qast.Option None]) : 'patt));
349        [Gramext.Snterm
350 +         (Grammar.Entry.obj (a_LABEL : 'a_LABEL Grammar.Entry.e));
351 +       Gramext.Sself],
352 +      Gramext.action
353 +        (fun (p : 'patt) (i : 'a_LABEL) (loc : int * int) ->
354 +           (Qast.Node ("PaLab", [Qast.Loc; i; Qast.Option (Some p)]) :
355 +            'patt));
356 +      [Gramext.Snterm
357           (Grammar.Entry.obj (a_TILDEIDENT : 'a_TILDEIDENT Grammar.Entry.e));
358         Gramext.Stoken ("", ":"); Gramext.Sself],
359        Gramext.action
360 @@ -3606,6 +3651,30 @@
361          (fun (i : 'a_QUESTIONIDENT) (loc : int * int) ->
362             (Qast.Node ("PaOlb", [Qast.Loc; i; Qast.Option None]) : 'ipatt));
363        [Gramext.Snterm
364 +         (Grammar.Entry.obj (a_OPTLABEL : 'a_OPTLABEL Grammar.Entry.e));
365 +       Gramext.Stoken ("", "(");
366 +       Gramext.Snterm
367 +         (Grammar.Entry.obj (ipatt_tcon : 'ipatt_tcon Grammar.Entry.e));
368 +       Gramext.srules
369 +         [[Gramext.Sopt
370 +             (Gramext.Snterm
371 +                (Grammar.Entry.obj (eq_expr : 'eq_expr Grammar.Entry.e)))],
372 +          Gramext.action
373 +            (fun (a : 'eq_expr option) (loc : int * int) ->
374 +               (Qast.Option a : 'a_opt));
375 +          [Gramext.Snterm
376 +             (Grammar.Entry.obj (a_opt : 'a_opt Grammar.Entry.e))],
377 +          Gramext.action
378 +            (fun (a : 'a_opt) (loc : int * int) -> (a : 'a_opt))];
379 +       Gramext.Stoken ("", ")")],
380 +      Gramext.action
381 +        (fun _ (eo : 'a_opt) (p : 'ipatt_tcon) _ (i : 'a_OPTLABEL)
382 +           (loc : int * int) ->
383 +           (Qast.Node
384 +              ("PaOlb",
385 +               [Qast.Loc; i; Qast.Option (Some (Qast.Tuple [p; eo]))]) :
386 +            'ipatt));
387 +      [Gramext.Snterm
388           (Grammar.Entry.obj
389              (a_QUESTIONIDENT : 'a_QUESTIONIDENT Grammar.Entry.e));
390         Gramext.Stoken ("", ":"); Gramext.Stoken ("", "(");
391 @@ -3636,6 +3705,13 @@
392          (fun (i : 'a_TILDEIDENT) (loc : int * int) ->
393             (Qast.Node ("PaLab", [Qast.Loc; i; Qast.Option None]) : 'ipatt));
394        [Gramext.Snterm
395 +         (Grammar.Entry.obj (a_LABEL : 'a_LABEL Grammar.Entry.e));
396 +       Gramext.Sself],
397 +      Gramext.action
398 +        (fun (p : 'ipatt) (i : 'a_LABEL) (loc : int * int) ->
399 +           (Qast.Node ("PaLab", [Qast.Loc; i; Qast.Option (Some p)]) :
400 +            'ipatt));
401 +      [Gramext.Snterm
402           (Grammar.Entry.obj (a_TILDEIDENT : 'a_TILDEIDENT Grammar.Entry.e));
403         Gramext.Stoken ("", ":"); Gramext.Sself],
404        Gramext.action
405 @@ -3669,6 +3745,13 @@
406          (fun (i : 'a_QUESTIONIDENT) (loc : int * int) ->
407             (Qast.Node ("ExOlb", [Qast.Loc; i; Qast.Option None]) : 'expr));
408        [Gramext.Snterm
409 +         (Grammar.Entry.obj (a_OPTLABEL : 'a_OPTLABEL Grammar.Entry.e));
410 +       Gramext.Sself],
411 +      Gramext.action
412 +        (fun (e : 'expr) (i : 'a_OPTLABEL) (loc : int * int) ->
413 +           (Qast.Node ("ExOlb", [Qast.Loc; i; Qast.Option (Some e)]) :
414 +            'expr));
415 +      [Gramext.Snterm
416           (Grammar.Entry.obj
417              (a_QUESTIONIDENT : 'a_QUESTIONIDENT Grammar.Entry.e));
418         Gramext.Stoken ("", ":"); Gramext.Sself],
419 @@ -3682,6 +3765,13 @@
420          (fun (i : 'a_TILDEIDENT) (loc : int * int) ->
421             (Qast.Node ("ExLab", [Qast.Loc; i; Qast.Option None]) : 'expr));
422        [Gramext.Snterm
423 +         (Grammar.Entry.obj (a_LABEL : 'a_LABEL Grammar.Entry.e));
424 +       Gramext.Sself],
425 +      Gramext.action
426 +        (fun (e : 'expr) (i : 'a_LABEL) (loc : int * int) ->
427 +           (Qast.Node ("ExLab", [Qast.Loc; i; Qast.Option (Some e)]) :
428 +            'expr));
429 +      [Gramext.Snterm
430           (Grammar.Entry.obj (a_TILDEIDENT : 'a_TILDEIDENT Grammar.Entry.e));
431         Gramext.Stoken ("", ":"); Gramext.Sself],
432        Gramext.action
433 @@ -4427,6 +4517,11 @@
434       Gramext.action
435         (fun (a : string) _ (loc : int * int) ->
436            (antiquot "" loc a : 'a_TILDEIDENT))]];
437 +   Grammar.Entry.obj (a_LABEL : 'a_LABEL Grammar.Entry.e), None,
438 +   [None, None,
439 +    [[Gramext.Stoken ("LABEL", "")],
440 +     Gramext.action
441 +       (fun (s : string) (loc : int * int) -> (Qast.Str s : 'a_LABEL))]];
442     Grammar.Entry.obj (a_QUESTIONIDENT : 'a_QUESTIONIDENT Grammar.Entry.e),
443     None,
444     [None, None,
445 @@ -4437,7 +4532,12 @@
446       [Gramext.Stoken ("", "?"); Gramext.Stoken ("ANTIQUOT", "")],
447       Gramext.action
448         (fun (a : string) _ (loc : int * int) ->
449 -          (antiquot "" loc a : 'a_QUESTIONIDENT))]]];;
450 +          (antiquot "" loc a : 'a_QUESTIONIDENT))]];
451 +   Grammar.Entry.obj (a_OPTLABEL : 'a_OPTLABEL Grammar.Entry.e), None,
452 +   [None, None,
453 +    [[Gramext.Stoken ("OPTLABEL", "")],
454 +     Gramext.action
455 +       (fun (s : string) (loc : int * int) -> (Qast.Str s : 'a_OPTLABEL))]]];;
456  
457  let apply_entry e =
458    let f s = Grammar.Entry.parse e (Stream.of_string s) in
459
This page took 0.04729 seconds and 2 git commands to generate.