diff --git a/camlp4/Camlp4Parsers/Camlp4OCamlParser.ml b/camlp4/Camlp4Parsers/Camlp4OCamlParser.ml index dcff09d3e..3d867032f 100644 --- a/camlp4/Camlp4Parsers/Camlp4OCamlParser.ml +++ b/camlp4/Camlp4Parsers/Camlp4OCamlParser.ml @@ -742,14 +742,14 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct | "#"; i = class_longident -> <:ctyp< # $i$ >> | "<"; ml = opt_meth_list; v = opt_dot_dot; ">" -> <:ctyp< < $ml$ $..:v$ > >> - | "["; rfl = row_field; "]" -> + | "["; OPT "|"; rfl = row_field; "]" -> <:ctyp< [ = $rfl$ ] >> | "["; ">"; "]" -> <:ctyp< [ > $<:ctyp<>>$ ] >> - | "["; ">"; rfl = row_field; "]" -> + | "["; ">"; OPT "|"; rfl = row_field; "]" -> <:ctyp< [ > $rfl$ ] >> - | "[<"; rfl = row_field; "]" -> + | "[<"; OPT "|"; rfl = row_field; "]" -> <:ctyp< [ < $rfl$ ] >> - | "[<"; rfl = row_field; ">"; ntl = name_tags; "]" -> + | "[<"; OPT "|"; rfl = row_field; ">"; ntl = name_tags; "]" -> <:ctyp< [ < $rfl$ > $ntl$ ] >> ] ] ;