aboutsummaryrefslogtreecommitdiffstats
path: root/caml/CMparser.mly
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2006-09-18 15:52:24 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2006-09-18 15:52:24 +0000
commit165407527b1be7df6a376791719321c788e55149 (patch)
tree35c2eb9603f007b033fced56f21fa49fd105562f /caml/CMparser.mly
parent1346309fd03e19da52156a700d037c348f27af0d (diff)
downloadcompcert-165407527b1be7df6a376791719321c788e55149.tar.gz
compcert-165407527b1be7df6a376791719321c788e55149.zip
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
Diffstat (limited to 'caml/CMparser.mly')
-rw-r--r--caml/CMparser.mly2
1 files changed, 1 insertions, 1 deletions
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) }