[camlp4] Fix the optional bar in polymorphic variants parsing PR#4216

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7931 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Nicolas Pouillard 2007-02-26 16:39:44 +00:00
parent 58381e7ecc
commit aae33d800c
1 changed files with 4 additions and 4 deletions

View File

@ -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$ ] >>
] ]
;