diff options
author | Michel Mauny <Michel.Mauny@ensta.fr> | 2003-03-12 13:39:36 +0000 |
---|---|---|
committer | Michel Mauny <Michel.Mauny@ensta.fr> | 2003-03-12 13:39:36 +0000 |
commit | d98aa4b06d0a76e57fe37c025b2b7795a616882f (patch) | |
tree | 41ead7b67437796a9b87d449a2ca9a9edd19e789 | |
parent | 9577b17bdb59a576668f99be0e0c8d2686ed8d9b (diff) |
Forbidden [| `A ] in the syntax (space between [ and | becomes necessary).
Reordered last production of simple_core_type2
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5431 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | parsing/parser.mly | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/parsing/parser.mly b/parsing/parser.mly index 52afbddc5..b2d480c30 100644 --- a/parsing/parser.mly +++ b/parsing/parser.mly @@ -1283,18 +1283,16 @@ simple_core_type2: { mktyp(Ptyp_variant([$2], true, None)) } | LBRACKET BAR row_field_list RBRACKET { mktyp(Ptyp_variant(List.rev $3, true, None)) } - | LBRACKETBAR row_field_list RBRACKET - { mktyp(Ptyp_variant(List.rev $2, true, None)) } | LBRACKET row_field BAR row_field_list RBRACKET { mktyp(Ptyp_variant($2 :: List.rev $4, true, None)) } | LBRACKET GREATER opt_bar row_field_list RBRACKET { mktyp(Ptyp_variant(List.rev $4, false, None)) } + | LBRACKET GREATER RBRACKET + { mktyp(Ptyp_variant([], false, None)) } | LBRACKETLESS opt_bar row_field_list RBRACKET { mktyp(Ptyp_variant(List.rev $3, true, Some [])) } | LBRACKETLESS opt_bar row_field_list GREATER name_tag_list RBRACKET { mktyp(Ptyp_variant(List.rev $3, true, Some (List.rev $5))) } - | LBRACKET GREATER RBRACKET - { mktyp(Ptyp_variant([], false, None)) } ; row_field_list: row_field { [$1] } |