diff options
author | Alain Frisch <alain@frisch.fr> | 2010-04-26 18:27:14 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2010-04-26 18:27:14 +0000 |
commit | 1f8e12830f557ed1f32ee82c1abec494b75f410c (patch) | |
tree | c8542d6a6a15e1f8df109c4cb02a7f685fc7b71a /parsing | |
parent | bfdf476b697ddf395bea56a8983ff937ef1a2342 (diff) |
Fix PR #5034.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10312 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'parsing')
-rw-r--r-- | parsing/parser.mly | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/parsing/parser.mly b/parsing/parser.mly index 6232e4fdc..43e6c10f0 100644 --- a/parsing/parser.mly +++ b/parsing/parser.mly @@ -850,8 +850,6 @@ expr: { mkexp(Pexp_letmodule($3, $4, $6)) } | LET OPEN mod_longident IN seq_expr { mkexp(Pexp_open($3, $5)) } - | mod_longident DOT LPAREN seq_expr RPAREN - { mkexp(Pexp_open($1, $4)) } | FUNCTION opt_bar match_cases { mkexp(Pexp_function("", None, List.rev $3)) } | FUN labeled_simple_pattern fun_def @@ -970,6 +968,10 @@ simple_expr: { let (t, t') = $3 in mkexp(Pexp_constraint($2, t, t')) } | simple_expr DOT label_longident { mkexp(Pexp_field($1, $3)) } + | mod_longident DOT LPAREN seq_expr RPAREN + { mkexp(Pexp_open($1, $4)) } + | mod_longident DOT LPAREN seq_expr error + { unclosed "(" 3 ")" 5 } | simple_expr DOT LPAREN seq_expr RPAREN { mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "Array" "get")), ["",$1; "",$4])) } |