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
/
p9
/
tst
/
expr.out.bak
< prev
next >
Wrap
Text File
|
2006-02-07
|
8KB
|
243 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
===== Intermediate Code Follows =====
! MAIN...
mainEntry
! VAR INITIALIZATION...
t1 := 0
x := t1
! VAR INITIALIZATION...
y := x
! VAR INITIALIZATION...
z := x
! VAR INITIALIZATION...
t2 := 0.0
a := t2
! VAR INITIALIZATION...
b := a
! VAR INITIALIZATION...
c := a
! ASSIGNMENT STMT...
t3 := &x
*t3 := y
! ASSIGNMENT STMT...
t4 := &x
t5 := 1234
*t4 := t5
! ASSIGNMENT STMT...
t6 := &a
*t6 := b
! ASSIGNMENT STMT...
t7 := &a
t8 := 123.456
*t7 := t8
! ASSIGNMENT STMT...
t9 := &x
t10 := - y (integer)
*t9 := t10
! ASSIGNMENT STMT...
t11 := &x
*t11 := y
! ASSIGNMENT STMT...
t12 := &x
t13 := y + z (integer)
*t12 := t13
! ASSIGNMENT STMT...
t14 := &x
t15 := y - z (integer)
*t14 := t15
! ASSIGNMENT STMT...
t16 := &x
t17 := y * z (integer)
*t16 := t17
! ASSIGNMENT STMT...
t18 := &x
t19 := y DIV z (integer)
*t18 := t19
! ASSIGNMENT STMT...
t20 := &x
t21 := y MOD z (integer)
*t20 := t21
! ASSIGNMENT STMT...
t22 := &a
t23 := - b (float)
*t22 := t23
! ASSIGNMENT STMT...
t24 := &a
*t24 := b
! ASSIGNMENT STMT...
t25 := &a
t26 := b + c (float)
*t25 := t26
! ASSIGNMENT STMT...
t27 := &a
t28 := b - c (float)
*t27 := t28
! ASSIGNMENT STMT...
t29 := &a
t30 := b * c (float)
*t29 := t30
! ASSIGNMENT STMT...
t31 := &a
t32 := b / c (float)
*t31 := t32
! ASSIGNMENT STMT...
t33 := &a
t34 := intToFloat (x)
*t33 := t34
! ASSIGNMENT STMT...
t35 := &a
t36 := 13
t37 := intToFloat (t36)
*t35 := t37
! ASSIGNMENT STMT...
t38 := &x
t39 := y + z (integer)
t40 := t39 + x (integer)
t41 := 6
t42 := t40 + t41 (integer)
*t38 := t42
! ASSIGNMENT STMT...
t43 := &x
t44 := 7
t45 := x + t44 (integer)
t46 := z + t45 (integer)
t47 := y + t46 (integer)
*t43 := t47
! ASSIGNMENT STMT...
t48 := &x
t49 := 3
t50 := - t49 (integer)
t51 := y DIV t50 (integer)
t52 := x * t51 (integer)
t53 := 5
t54 := x MOD t53 (integer)
t55 := z - t54 (integer)
t56 := x * t55 (integer)
t57 := t52 + t56 (integer)
*t48 := t57
! ASSIGNMENT STMT...
t58 := &x
t59 := 3
t60 := t59 * y (integer)
t61 := 4
t62 := z - x (integer)
t63 := t61 * t62 (integer)
t64 := t60 + t63 (integer)
*t58 := t64
! ASSIGNMENT STMT...
t65 := &a
t66 := 3.0
t67 := t66 * b (float)
t68 := 4.123
t69 := intToFloat (x)
t70 := c - t69 (float)
t71 := t68 * t70 (float)
t72 := t67 + t71 (float)
*t65 := t72
! ASSIGNMENT STMT...
t73 := &x
t74 := - x (integer)
t75 := 1
t76 := t74 - t75 (integer)
t77 := 2
t78 := y - t77 (integer)
t79 := t76 DIV t78 (integer)
t80 := - z (integer)
t81 := 3
t82 := t80 MOD t81 (integer)
t83 := 4
t84 := x DIV t83 (integer)
t85 := t82 + t84 (integer)
t86 := t79 * t85 (integer)
t87 := 5
t88 := y - t87 (integer)
t89 := - t88 (integer)
t90 := 6
t91 := z - t90 (integer)
t92 := - t91 (integer)
t93 := t89 + t92 (integer)
t94 := 7
t95 := x - t94 (integer)
t96 := - t95 (integer)
t97 := 8
t98 := y - t97 (integer)
t99 := - t98 (integer)
t100 := t96 + t99 (integer)
t101 := t93 * t100 (integer)
t102 := t86 + t101 (integer)
*t73 := t102
! ASSIGNMENT STMT...
t103 := &a
t104 := - b (float)
t105 := 1.1
t106 := t104 - t105 (float)
t107 := 2.2
t108 := c - t107 (float)
t109 := t106 / t108 (float)
t110 := - x (integer)
t111 := intToFloat (t110)
t112 := 3.3
t113 := t111 / t112 (float)
t114 := intToFloat (y)
t115 := 4.4
t116 := t114 / t115 (float)
t117 := t113 + t116 (float)
t118 := t109 * t117 (float)
t119 := intToFloat (z)
t120 := 5.5
t121 := t119 - t120 (float)
t122 := - t121 (float)
t123 := 6.6
t124 := a - t123 (float)
t125 := - t124 (float)
t126 := t122 + t125 (float)
t127 := 7.7
t128 := b - t127 (float)
t129 := - t128 (float)
t130 := 8.8
t131 := c - t130 (float)
t132 := - t131 (float)
t133 := t129 + t132 (float)
t134 := t126 * t133 (float)
t135 := t118 + t134 (float)
*t103 := t135
! MAIN EXIT...
mainExit
=======================================