From a3b271c948c85e67ab1b897032ec7ddc36856aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pasteur?= Date: Tue, 27 Jul 2010 15:32:39 +0200 Subject: [PATCH] Allow to write x.f.g --- compiler/heptagon/parsing/hept_parser.mly | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/heptagon/parsing/hept_parser.mly b/compiler/heptagon/parsing/hept_parser.mly index 5369426..3e4fca1 100644 --- a/compiler/heptagon/parsing/hept_parser.mly +++ b/compiler/heptagon/parsing/hept_parser.mly @@ -393,6 +393,9 @@ _simple_exp: | 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] } ; node_name: @@ -461,9 +464,6 @@ _exp: RPAREN DOUBLE_LESS simple_exp DOUBLE_GREATER LPAREN exps RPAREN { mk_iterator_call $1 $3 $5 $9 $12 } /*Records operators */ - | simple_exp DOT c=longname - { mk_call ~params:[mk_constructor_exp c (Loc($startpos(c),$endpos(c)))] - Efield [$1] } | LBRACE simple_exp WITH DOT c=longname EQUAL exp RBRACE { mk_call ~params:[mk_constructor_exp c (Loc($startpos(c),$endpos(c)))] Efield_update [$2; $7] }