From 33ea630d4d431045c13e96c51e953ce0bafb4f0f Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 24 Sep 2004 08:46:03 +0000 Subject: bug fixes in parsing etc; improved ImperC --- examples/gfcc/ImperC.gf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'examples/gfcc/ImperC.gf') diff --git a/examples/gfcc/ImperC.gf b/examples/gfcc/ImperC.gf index a97688529..fd59e16d5 100644 --- a/examples/gfcc/ImperC.gf +++ b/examples/gfcc/ImperC.gf @@ -26,10 +26,10 @@ concrete ImperC of Imper = open ResImper in { } ; Decl typ cont = continues (typ.s ++ cont.$0) cont ; - Assign _ x exp = continues (x.s ++ "=" ++ ex exp) ; - Return _ exp = statement ("return" ++ ex exp) ; - While exp loop = continue ("while" ++ paren (ex exp) ++ loop.s) ; - IfElse exp t f = continue ("if" ++ paren (ex exp) ++ t.s ++ "else" ++ f.s) ; + Assign _ x exp = continues (x.s ++ "=" ++ exp.s) ; + Return _ exp = statement ("return" ++ exp.s) ; + While exp loop = continue ("while" ++ paren exp.s ++ loop.s) ; + IfElse exp t f = continue ("if" ++ paren exp.s ++ t.s ++ "else" ++ f.s) ; Block stm = continue ("{" ++ stm.s ++ "}") ; End = ss [] ; @@ -50,6 +50,6 @@ concrete ImperC of Imper = open ResImper in { ConsTyp = cc2 ; NilExp = ss [] ; - OneExp _ e = ss (ex e) ; - ConsExp _ _ e es = ss (ex e ++ "," ++ es.s) ; + OneExp _ e = e ; + ConsExp _ _ e es = ss (e.s ++ "," ++ es.s) ; } -- cgit v1.2.3