home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.pdx.edu
/
2014.02.ftp.ee.pdx.edu.tar
/
ftp.ee.pdx.edu
/
pub
/
users
/
Harry
/
compilers
/
p10
/
tst
/
expr.out.bak
< prev
next >
Wrap
Text File
|
2006-02-17
|
6KB
|
202 lines
PROGRAM IS
VAR
x: integer := 0;
y: integer := x;
z: integer := x;
a: real := 0.0;
b: real := a;
c: real := a;
BEGIN
x := y;
x := 1234;
a := b;
a := 123.456;
x := - y;
x := + y;
x := (y + z);
x := (y - z);
x := (y * z);
x := (y DIV z);
x := (y MOD z);
a := - b;
a := + b;
a := (b + c);
a := (b - c);
a := (b * c);
a := (b / c);
a := intToReal (x);
a := intToReal (13);
x := (((y + z) + x) + 6);
x := (y + (z + (x + 7)));
x := ((x * (y DIV - 3)) + (x * (z - (x MOD 5))));
x := ((3 * y) + (4 * (z - x)));
a := ((3.0 * b) + (4.123 * (c - intToReal (x))));
x := (((+ (- x - 1) DIV + (y - 2)) * (+ (- z MOD 3) + + (x DIV 4))) + ((- (+ y - 5) + - (z - 6)) * (- (+ x - 7) + - (y - 8))));
a := (((+ (- b - 1.1) / + (c - 2.2)) * (+ (intToReal (- x) / 3.3) + + (intToReal (y) / 4.4))) + ((- (intToReal (+ z) - 5.5) + - (a - 6.6)) * (- (+ b - 7.7) + - (c - 8.8))));
END;
maxLexicalLevel = 0
===== String List Follows =====
===== Float List Follows =====
float12: 8.8
float11: 7.7
float10: 6.6
float9: 5.5
float8: 4.4
float7: 3.3
float6: 2.2
float5: 1.1
float4: 4.123
float3: 3.0
float2: 123.456
float1: 0.0
===== Intermediate Code Follows =====
! MAIN...
mainEntry
! VAR INITIALIZATION...
x := 0
! VAR INITIALIZATION...
y := x
! VAR INITIALIZATION...
z := x
! VAR INITIALIZATION...
a := 0.0
! VAR INITIALIZATION...
b := a
! VAR INITIALIZATION...
c := a
! ASSIGNMENT STMT...
x := y
! ASSIGNMENT STMT...
x := 1234
! ASSIGNMENT STMT...
a := b
! ASSIGNMENT STMT...
a := 123.456
! ASSIGNMENT STMT...
t1 := - y (integer)
x := t1
! ASSIGNMENT STMT...
x := y
! ASSIGNMENT STMT...
t2 := y + z (integer)
x := t2
! ASSIGNMENT STMT...
t3 := y - z (integer)
x := t3
! ASSIGNMENT STMT...
t4 := y * z (integer)
x := t4
! ASSIGNMENT STMT...
t5 := y DIV z (integer)
x := t5
! ASSIGNMENT STMT...
t6 := y MOD z (integer)
x := t6
! ASSIGNMENT STMT...
t7 := - b (float)
a := t7
! ASSIGNMENT STMT...
a := b
! ASSIGNMENT STMT...
t8 := b + c (float)
a := t8
! ASSIGNMENT STMT...
t9 := b - c (float)
a := t9
! ASSIGNMENT STMT...
t10 := b * c (float)
a := t10
! ASSIGNMENT STMT...
t11 := b / c (float)
a := t11
! ASSIGNMENT STMT...
t12 := intToFloat (x)
a := t12
! ASSIGNMENT STMT...
t13 := intToFloat (13)
a := t13
! ASSIGNMENT STMT...
t14 := y + z (integer)
t15 := t14 + x (integer)
t16 := t15 + 6 (integer)
x := t16
! ASSIGNMENT STMT...
t17 := x + 7 (integer)
t18 := z + t17 (integer)
t19 := y + t18 (integer)
x := t19
! ASSIGNMENT STMT...
t20 := - 3 (integer)
t21 := y DIV t20 (integer)
t22 := x * t21 (integer)
t23 := x MOD 5 (integer)
t24 := z - t23 (integer)
t25 := x * t24 (integer)
t26 := t22 + t25 (integer)
x := t26
! ASSIGNMENT STMT...
t27 := 3 * y (integer)
t28 := z - x (integer)
t29 := 4 * t28 (integer)
t30 := t27 + t29 (integer)
x := t30
! ASSIGNMENT STMT...
t31 := 3.0 * b (float)
t32 := intToFloat (x)
t33 := c - t32 (float)
t34 := 4.123 * t33 (float)
t35 := t31 + t34 (float)
a := t35
! ASSIGNMENT STMT...
t36 := - x (integer)
t37 := t36 - 1 (integer)
t38 := y - 2 (integer)
t39 := t37 DIV t38 (integer)
t40 := - z (integer)
t41 := t40 MOD 3 (integer)
t42 := x DIV 4 (integer)
t43 := t41 + t42 (integer)
t44 := t39 * t43 (integer)
t45 := y - 5 (integer)
t46 := - t45 (integer)
t47 := z - 6 (integer)
t48 := - t47 (integer)
t49 := t46 + t48 (integer)
t50 := x - 7 (integer)
t51 := - t50 (integer)
t52 := y - 8 (integer)
t53 := - t52 (integer)
t54 := t51 + t53 (integer)
t55 := t49 * t54 (integer)
t56 := t44 + t55 (integer)
x := t56
! ASSIGNMENT STMT...
t57 := - b (float)
t58 := t57 - 1.1 (float)
t59 := c - 2.2 (float)
t60 := t58 / t59 (float)
t61 := - x (integer)
t62 := intToFloat (t61)
t63 := t62 / 3.3 (float)
t64 := intToFloat (y)
t65 := t64 / 4.4 (float)
t66 := t63 + t65 (float)
t67 := t60 * t66 (float)
t68 := intToFloat (z)
t69 := t68 - 5.5 (float)
t70 := - t69 (float)
t71 := a - 6.6 (float)
t72 := - t71 (float)
t73 := t70 + t72 (float)
t74 := b - 7.7 (float)
t75 := - t74 (float)
t76 := c - 8.8 (float)
t77 := - t76 (float)
t78 := t75 + t77 (float)
t79 := t73 * t78 (float)
t80 := t67 + t79 (float)
a := t80
! MAIN EXIT...
mainExit
=======================================