From 7945ef9eb89761f5f855e04b61324b5eb3fa9172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pasteur?= Date: Wed, 28 Jul 2010 09:36:56 +0200 Subject: [PATCH] Fixed a problem with simple_exp This enables the parser to accept both m.x.y and (m.x).y --- compiler/heptagon/parsing/hept_parser.mly | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/heptagon/parsing/hept_parser.mly b/compiler/heptagon/parsing/hept_parser.mly index ba99df8..97df578 100644 --- a/compiler/heptagon/parsing/hept_parser.mly +++ b/compiler/heptagon/parsing/hept_parser.mly @@ -385,14 +385,15 @@ exps: | nonmtexps {$1} ; -simple_exp: e=_simple_exp { mk_exp e (Loc($startpos,$endpos)) } +simple_exp: + | e=_simple_exp { mk_exp e (Loc($startpos,$endpos)) } + | LPAREN exp RPAREN { $2 } _simple_exp: | IDENT { Evar $1 } | const { Econst $1 } | LBRACE field_exp_list RBRACE { Estruct $2 } | LBRACKET array_exp_list RBRACKET { mk_call Earray $2 } | LPAREN tuple_exp RPAREN { mk_call Etuple $2 } - | LPAREN _exp RPAREN { $2 } | simple_exp DOT c=longname { mk_call ~params:[mk_constructor_exp c (Loc($startpos(c),$endpos(c)))] Efield [$1] }