diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2006-04-06 13:09:32 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2006-04-06 13:09:32 +0000 |
commit | 53ff175479ca9993c4c57e3bb71c527b9c2a5053 (patch) | |
tree | c6a1ef2e8c5069b12704f92b5150fadf7449add3 | |
parent | 2af6ceefe79f3f19e0e341857067415d25b8c9cf (diff) | |
download | compcert-53ff175479ca9993c4c57e3bb71c527b9c2a5053.tar.gz compcert-53ff175479ca9993c4c57e3bb71c527b9c2a5053.zip |
Suppression de stmtlist dans Cminor
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@12 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
-rw-r--r-- | caml/CMparser.mly | 10 | ||||
-rw-r--r-- | caml/RTLgenaux.ml | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/caml/CMparser.mly b/caml/CMparser.mly index 99e2a6c3..d461a157 100644 --- a/caml/CMparser.mly +++ b/caml/CMparser.mly @@ -208,9 +208,9 @@ var_declaration: stmt: expr SEMICOLON { Sexpr $1 } | IF LPAREN expr RPAREN stmts ELSE stmts { Cmconstr.ifthenelse $3 $5 $7 } - | IF LPAREN expr RPAREN stmts { Cmconstr.ifthenelse $3 $5 Snil } + | IF LPAREN expr RPAREN stmts { Cmconstr.ifthenelse $3 $5 Sskip } | LOOP stmts { Sloop($2) } - | LBRACELBRACE stmts RBRACERBRACE { Sblock($2) } + | LBRACELBRACE stmt_list RBRACERBRACE { Sblock($2) } | EXIT SEMICOLON { Sexit O } | EXIT INTLIT SEMICOLON { Sexit (nat_of_camlint(Int32.pred $2)) } | RETURN SEMICOLON { Sreturn None } @@ -219,12 +219,12 @@ stmt: stmts: LBRACE stmt_list RBRACE { $2 } - | stmt { Scons($1, Snil) } + | stmt { $1 } ; stmt_list: - /* empty */ { Snil } - | stmt stmt_list { Scons($1, $2) } + /* empty */ { Sskip } + | stmt stmt_list { Sseq($1, $2) } ; /* Expressions */ diff --git a/caml/RTLgenaux.ml b/caml/RTLgenaux.ml index 3e6ca3d3..336346af 100644 --- a/caml/RTLgenaux.ml +++ b/caml/RTLgenaux.ml @@ -1,3 +1,3 @@ open Cminor -let more_likely (c: condexpr) (ifso: stmtlist) (ifnot: stmtlist) = false +let more_likely (c: condexpr) (ifso: stmt) (ifnot: stmt) = false |