summaryrefslogtreecommitdiffstats
path: root/parsing
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2010-04-26 18:27:14 +0000
committerAlain Frisch <alain@frisch.fr>2010-04-26 18:27:14 +0000
commit1f8e12830f557ed1f32ee82c1abec494b75f410c (patch)
treec8542d6a6a15e1f8df109c4cb02a7f685fc7b71a /parsing
parentbfdf476b697ddf395bea56a8983ff937ef1a2342 (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.mly6
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])) }