From 165407527b1be7df6a376791719321c788e55149 Mon Sep 17 00:00:00 2001 From: xleroy Date: Mon, 18 Sep 2006 15:52:24 +0000 Subject: Simplification de Cminor: les affectations de variables locales ne sont plus des expressions mais des statements (Eassign -> Sassign). Cela simplifie les preuves et ameliore la qualite du RTL produit. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@111 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- caml/CMparser.mly | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'caml/CMparser.mly') diff --git a/caml/CMparser.mly b/caml/CMparser.mly index 2df44fb3..d9a81874 100644 --- a/caml/CMparser.mly +++ b/caml/CMparser.mly @@ -216,6 +216,7 @@ var_declaration: stmt: expr SEMICOLON { Sexpr $1 } + | IDENT EQUAL expr SEMICOLON { Sassign($1, $3) } | IF LPAREN expr RPAREN stmts ELSE stmts { Cmconstr.ifthenelse $3 $5 $7 } | IF LPAREN expr RPAREN stmts { Cmconstr.ifthenelse $3 $5 Sskip } | LOOP stmts { Sloop($2) } @@ -241,7 +242,6 @@ stmt_list: expr: LPAREN expr RPAREN { $2 } | IDENT { Evar $1 } - | IDENT EQUAL expr { Eassign($1, $3) } | INTLIT { intconst $1 } | FLOATLIT { Eop(Ofloatconst $1, Enil) } | STRINGLIT { Eop(Oaddrsymbol($1, Int.zero), Enil) } -- cgit