From e6b55ae07fce6518991fd99f6c7c34b827df6266 Mon Sep 17 00:00:00 2001 From: Michel Mauny Date: Wed, 16 Jul 2003 18:59:26 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5704 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- camlp4/etc/pa_o.ml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/camlp4/etc/pa_o.ml b/camlp4/etc/pa_o.ml index 467603e75..cbefcc8c9 100644 --- a/camlp4/etc/pa_o.ml +++ b/camlp4/etc/pa_o.ml @@ -862,17 +862,21 @@ EXTEND [ [ "constraint"; t1 = ctyp; "="; t2 = ctyp -> (t1, t2) ] ] ; type_kind: - [ [ test_constr_decl; pf = OPT "private"; OPT "|"; - cdl = LIST1 constructor_declaration SEP "|" -> - if o2b pf then <:ctyp< private [ $list:cdl$ ] >> - else <:ctyp< [ $list:cdl$ ] >> + [ [ "private"; "{"; ldl = label_declarations; "}" -> + <:ctyp< private { $list:ldl$ } >> + | "private"; OPT "|"; + cdl = LIST1 constructor_declaration SEP "|" -> <:ctyp< private [ $list:cdl$ ] >> + | test_constr_decl; OPT "|"; + cdl = LIST1 constructor_declaration SEP "|" -> <:ctyp< [ $list:cdl$ ] >> | t = ctyp -> <:ctyp< $t$ >> + | t = ctyp; "="; "private"; "{"; ldl = label_declarations; "}" -> + <:ctyp< $t$ == private { $list:ldl$ } >> | t = ctyp; "="; "{"; ldl = label_declarations; "}" -> <:ctyp< $t$ == { $list:ldl$ } >> + | t = ctyp; "="; "private"; OPT "|"; cdl = LIST1 constructor_declaration SEP "|" -> + <:ctyp< $t$ == private [ $list:cdl$ ] >> | t = ctyp; "="; OPT "|"; cdl = LIST1 constructor_declaration SEP "|" -> <:ctyp< $t$ == [ $list:cdl$ ] >> - | "private"; "{"; ldl = label_declarations; "}" -> - <:ctyp< private { $list:ldl$ } >> | "{"; ldl = label_declarations; "}" -> <:ctyp< { $list:ldl$ } >> ] ] ;