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
/
recArray.out.bak
< prev
next >
Wrap
Text File
|
2006-02-17
|
24KB
|
617 lines
PROGRAM IS
TYPE
T1 IS ARRAY OF T2;
T2 IS RECORD f1: integer; f2: T1; f3: T2; f4: boolean; END;
VAR
x1: T1 := T1 {{ 5 OF T2 { f1 := 123; f2 := NIL; f3 := NIL; f4 := FALSE } }};
x2: T1 := x1;
x3: T1 := x1;
y1: T2 := T2 { f1 := 123; f2 := T1 {{ 6 OF NIL }}; f3 := NIL; f4 := FALSE };
y2: T2 := y1;
y3: T2 := y1;
i: integer := 0;
b: boolean := FALSE;
BEGIN
x1 := T1 {{ 100 OF NIL }};
y1 := T2 { f1 := 123; f2 := x1; f3 := NIL; f4 := FALSE };
x2 := T1 {{ 200 OF y1 }};
y2 := T2 { f1 := 321; f2 := x2; f3 := y1; f4 := TRUE };
y3 := x1[57];
x1[68] := y2;
i := y1.f1;
y1.f1 := 456;
x3 := y1.f2;
y1.f2 := x2;
y3 := y1.f3;
y1.f3 := y2;
b := y1.f4;
y1.f4 := TRUE;
i := x2[42].f1;
x2[42].f1 := 135;
x3 := x2[42].f2;
x2[42].f2 := x2;
y1 := x2[42].f3;
x2[42].f3 := y2;
b := x2[42].f4;
x2[42].f4 := TRUE;
y2.f2[33] := y2.f2[44];
y2.f3.f2[55] := y2.f3.f2[66];
y2.f3.f3.f2[66].f3.f2[77].f3 := y2.f3.f3.f2[66].f3.f2[77].f3;
x1 := T1 {{ 5 OF T2 { f1 := 123; f2 := T1 {{ 6 OF T2 { f1 := 246; f2 := T1 {{ 7 OF y3 }}; f3 := y2; f4 := FALSE } }}; f3 := T2 { f1 := 357; f2 := T1 {{ 8 OF y1 }}; f3 := y2; f4 := FALSE }; f4 := TRUE } }};
y1 := T2 { f1 := 431; f2 := T1 {{ 9 OF T2 { f1 := 987; f2 := T1 {{ 10 OF y3 }}; f3 := y1; f4 := FALSE } }}; f3 := T2 { f1 := 789; f2 := T1 {{ 11 OF y2 }}; f3 := y1; f4 := TRUE }; f4 := TRUE };
END;
maxLexicalLevel = 0
===== String List Follows =====
===== Float List Follows =====
===== Intermediate Code Follows =====
! MAIN...
mainEntry
! VAR INITIALIZATION...
t1 := 0
if 5 <= 0 then goto runtimeError5 (integer)
t1 := t1 + 5 (integer)
t2 := alloc (16)
if t2 = 0 then goto runtimeError1 (integer)
t3 := t2 + 0 (integer)
*t3 := 123
t3 := t2 + 4 (integer)
*t3 := 0
t3 := t2 + 8 (integer)
*t3 := 0
t3 := t2 + 12 (integer)
*t3 := 0
t4 := t1 * 4 (integer)
t4 := t4 + 4 (integer)
t4 := alloc (t4)
if t4 = 0 then goto runtimeError1 (integer)
t5 := t4
*t4 := t1
t6 := 5
Label_1:
t4 := t4 + 4 (integer)
*t4 := t2
t6 := t6 - 1 (integer)
if t6 > 0 then goto Label_1 (integer)
x1 := t5
! VAR INITIALIZATION...
x2 := x1
! VAR INITIALIZATION...
x3 := x1
! VAR INITIALIZATION...
t7 := alloc (16)
if t7 = 0 then goto runtimeError1 (integer)
t8 := t7 + 0 (integer)
*t8 := 123
t9 := 0
if 6 <= 0 then goto runtimeError5 (integer)
t9 := t9 + 6 (integer)
t10 := t9 * 4 (integer)
t10 := t10 + 4 (integer)
t10 := alloc (t10)
if t10 = 0 then goto runtimeError1 (integer)
t11 := t10
*t10 := t9
t12 := 6
Label_2:
t10 := t10 + 4 (integer)
*t10 := 0
t12 := t12 - 1 (integer)
if t12 > 0 then goto Label_2 (integer)
t8 := t7 + 4 (integer)
*t8 := t11
t8 := t7 + 8 (integer)
*t8 := 0
t8 := t7 + 12 (integer)
*t8 := 0
y1 := t7
! VAR INITIALIZATION...
y2 := y1
! VAR INITIALIZATION...
y3 := y1
! VAR INITIALIZATION...
i := 0
! VAR INITIALIZATION...
b := 0
! ASSIGNMENT STMT...
t13 := 0
if 100 <= 0 then goto runtimeError5 (integer)
t13 := t13 + 100 (integer)
t14 := t13 * 4 (integer)
t14 := t14 + 4 (integer)
t14 := alloc (t14)
if t14 = 0 then goto runtimeError1 (integer)
t15 := t14
*t14 := t13
t16 := 100
Label_3:
t14 := t14 + 4 (integer)
*t14 := 0
t16 := t16 - 1 (integer)
if t16 > 0 then goto Label_3 (integer)
x1 := t15
! ASSIGNMENT STMT...
t17 := alloc (16)
if t17 = 0 then goto runtimeError1 (integer)
t18 := t17 + 0 (integer)
*t18 := 123
t18 := t17 + 4 (integer)
*t18 := x1
t18 := t17 + 8 (integer)
*t18 := 0
t18 := t17 + 12 (integer)
*t18 := 0
y1 := t17
! ASSIGNMENT STMT...
t19 := 0
if 200 <= 0 then goto runtimeError5 (integer)
t19 := t19 + 200 (integer)
t20 := t19 * 4 (integer)
t20 := t20 + 4 (integer)
t20 := alloc (t20)
if t20 = 0 then goto runtimeError1 (integer)
t21 := t20
*t20 := t19
t22 := 200
Label_4:
t20 := t20 + 4 (integer)
*t20 := y1
t22 := t22 - 1 (integer)
if t22 > 0 then goto Label_4 (integer)
x2 := t21
! ASSIGNMENT STMT...
t23 := alloc (16)
if t23 = 0 then goto runtimeError1 (integer)
t24 := t23 + 0 (integer)
*t24 := 321
t24 := t23 + 4 (integer)
*t24 := x2
t24 := t23 + 8 (integer)
*t24 := y1
t24 := t23 + 12 (integer)
*t24 := 1
y2 := t23
! ASSIGNMENT STMT...
if x1 = 0 then goto runtimeError2 (integer)
if 57 < 0 then goto runtimeError4 (integer)
t25 := *x1
if 57 >= t25 then goto runtimeError4 (integer)
t25 := 57 * 4 (integer)
t25 := t25 + 4 (integer)
t25 := x1 + t25 (integer)
t26 := *t25
y3 := t26
! ASSIGNMENT STMT...
if x1 = 0 then goto runtimeError2 (integer)
if 68 < 0 then goto runtimeError4 (integer)
t27 := *x1
if 68 >= t27 then goto runtimeError4 (integer)
t27 := 68 * 4 (integer)
t27 := t27 + 4 (integer)
t27 := x1 + t27 (integer)
*t27 := y2
! ASSIGNMENT STMT...
if y1 = 0 then goto runtimeError2 (integer)
t28 := *y1
i := t28
! ASSIGNMENT STMT...
if y1 = 0 then goto runtimeError2 (integer)
*y1 := 456
! ASSIGNMENT STMT...
if y1 = 0 then goto runtimeError2 (integer)
t29 := y1 + 4 (integer)
t30 := *t29
x3 := t30
! ASSIGNMENT STMT...
if y1 = 0 then goto runtimeError2 (integer)
t31 := y1 + 4 (integer)
*t31 := x2
! ASSIGNMENT STMT...
if y1 = 0 then goto runtimeError2 (integer)
t32 := y1 + 8 (integer)
t33 := *t32
y3 := t33
! ASSIGNMENT STMT...
if y1 = 0 then goto runtimeError2 (integer)
t34 := y1 + 8 (integer)
*t34 := y2
! ASSIGNMENT STMT...
if y1 = 0 then goto runtimeError2 (integer)
t35 := y1 + 12 (integer)
t36 := *t35
b := t36
! ASSIGNMENT STMT...
if y1 = 0 then goto runtimeError2 (integer)
t37 := y1 + 12 (integer)
*t37 := 1
! ASSIGNMENT STMT...
if x2 = 0 then goto runtimeError2 (integer)
if 42 < 0 then goto runtimeError4 (integer)
t38 := *x2
if 42 >= t38 then goto runtimeError4 (integer)
t38 := 42 * 4 (integer)
t38 := t38 + 4 (integer)
t38 := x2 + t38 (integer)
t39 := *t38
if t39 = 0 then goto runtimeError2 (integer)
t40 := *t39
i := t40
! ASSIGNMENT STMT...
if x2 = 0 then goto runtimeError2 (integer)
if 42 < 0 then goto runtimeError4 (integer)
t41 := *x2
if 42 >= t41 then goto runtimeError4 (integer)
t41 := 42 * 4 (integer)
t41 := t41 + 4 (integer)
t41 := x2 + t41 (integer)
t42 := *t41
if t42 = 0 then goto runtimeError2 (integer)
*t42 := 135
! ASSIGNMENT STMT...
if x2 = 0 then goto runtimeError2 (integer)
if 42 < 0 then goto runtimeError4 (integer)
t43 := *x2
if 42 >= t43 then goto runtimeError4 (integer)
t43 := 42 * 4 (integer)
t43 := t43 + 4 (integer)
t43 := x2 + t43 (integer)
t44 := *t43
if t44 = 0 then goto runtimeError2 (integer)
t45 := t44 + 4 (integer)
t46 := *t45
x3 := t46
! ASSIGNMENT STMT...
if x2 = 0 then goto runtimeError2 (integer)
if 42 < 0 then goto runtimeError4 (integer)
t47 := *x2
if 42 >= t47 then goto runtimeError4 (integer)
t47 := 42 * 4 (integer)
t47 := t47 + 4 (integer)
t47 := x2 + t47 (integer)
t48 := *t47
if t48 = 0 then goto runtimeError2 (integer)
t49 := t48 + 4 (integer)
*t49 := x2
! ASSIGNMENT STMT...
if x2 = 0 then goto runtimeError2 (integer)
if 42 < 0 then goto runtimeError4 (integer)
t50 := *x2
if 42 >= t50 then goto runtimeError4 (integer)
t50 := 42 * 4 (integer)
t50 := t50 + 4 (integer)
t50 := x2 + t50 (integer)
t51 := *t50
if t51 = 0 then goto runtimeError2 (integer)
t52 := t51 + 8 (integer)
t53 := *t52
y1 := t53
! ASSIGNMENT STMT...
if x2 = 0 then goto runtimeError2 (integer)
if 42 < 0 then goto runtimeError4 (integer)
t54 := *x2
if 42 >= t54 then goto runtimeError4 (integer)
t54 := 42 * 4 (integer)
t54 := t54 + 4 (integer)
t54 := x2 + t54 (integer)
t55 := *t54
if t55 = 0 then goto runtimeError2 (integer)
t56 := t55 + 8 (integer)
*t56 := y2
! ASSIGNMENT STMT...
if x2 = 0 then goto runtimeError2 (integer)
if 42 < 0 then goto runtimeError4 (integer)
t57 := *x2
if 42 >= t57 then goto runtimeError4 (integer)
t57 := 42 * 4 (integer)
t57 := t57 + 4 (integer)
t57 := x2 + t57 (integer)
t58 := *t57
if t58 = 0 then goto runtimeError2 (integer)
t59 := t58 + 12 (integer)
t60 := *t59
b := t60
! ASSIGNMENT STMT...
if x2 = 0 then goto runtimeError2 (integer)
if 42 < 0 then goto runtimeError4 (integer)
t61 := *x2
if 42 >= t61 then goto runtimeError4 (integer)
t61 := 42 * 4 (integer)
t61 := t61 + 4 (integer)
t61 := x2 + t61 (integer)
t62 := *t61
if t62 = 0 then goto runtimeError2 (integer)
t63 := t62 + 12 (integer)
*t63 := 1
! ASSIGNMENT STMT...
if y2 = 0 then goto runtimeError2 (integer)
t64 := y2 + 4 (integer)
t65 := *t64
if t65 = 0 then goto runtimeError2 (integer)
if 33 < 0 then goto runtimeError4 (integer)
t66 := *t65
if 33 >= t66 then goto runtimeError4 (integer)
t66 := 33 * 4 (integer)
t66 := t66 + 4 (integer)
t66 := t65 + t66 (integer)
if y2 = 0 then goto runtimeError2 (integer)
t67 := y2 + 4 (integer)
t68 := *t67
if t68 = 0 then goto runtimeError2 (integer)
if 44 < 0 then goto runtimeError4 (integer)
t69 := *t68
if 44 >= t69 then goto runtimeError4 (integer)
t69 := 44 * 4 (integer)
t69 := t69 + 4 (integer)
t69 := t68 + t69 (integer)
t70 := *t69
*t66 := t70
! ASSIGNMENT STMT...
if y2 = 0 then goto runtimeError2 (integer)
t71 := y2 + 8 (integer)
t72 := *t71
if t72 = 0 then goto runtimeError2 (integer)
t73 := t72 + 4 (integer)
t74 := *t73
if t74 = 0 then goto runtimeError2 (integer)
if 55 < 0 then goto runtimeError4 (integer)
t75 := *t74
if 55 >= t75 then goto runtimeError4 (integer)
t75 := 55 * 4 (integer)
t75 := t75 + 4 (integer)
t75 := t74 + t75 (integer)
if y2 = 0 then goto runtimeError2 (integer)
t76 := y2 + 8 (integer)
t77 := *t76
if t77 = 0 then goto runtimeError2 (integer)
t78 := t77 + 4 (integer)
t79 := *t78
if t79 = 0 then goto runtimeError2 (integer)
if 66 < 0 then goto runtimeError4 (integer)
t80 := *t79
if 66 >= t80 then goto runtimeError4 (integer)
t80 := 66 * 4 (integer)
t80 := t80 + 4 (integer)
t80 := t79 + t80 (integer)
t81 := *t80
*t75 := t81
! ASSIGNMENT STMT...
if y2 = 0 then goto runtimeError2 (integer)
t82 := y2 + 8 (integer)
t83 := *t82
if t83 = 0 then goto runtimeError2 (integer)
t84 := t83 + 8 (integer)
t85 := *t84
if t85 = 0 then goto runtimeError2 (integer)
t86 := t85 + 4 (integer)
t87 := *t86
if t87 = 0 then goto runtimeError2 (integer)
if 66 < 0 then goto runtimeError4 (integer)
t88 := *t87
if 66 >= t88 then goto runtimeError4 (integer)
t88 := 66 * 4 (integer)
t88 := t88 + 4 (integer)
t88 := t87 + t88 (integer)
t89 := *t88
if t89 = 0 then goto runtimeError2 (integer)
t90 := t89 + 8 (integer)
t91 := *t90
if t91 = 0 then goto runtimeError2 (integer)
t92 := t91 + 4 (integer)
t93 := *t92
if t93 = 0 then goto runtimeError2 (integer)
if 77 < 0 then goto runtimeError4 (integer)
t94 := *t93
if 77 >= t94 then goto runtimeError4 (integer)
t94 := 77 * 4 (integer)
t94 := t94 + 4 (integer)
t94 := t93 + t94 (integer)
t95 := *t94
if t95 = 0 then goto runtimeError2 (integer)
t96 := t95 + 8 (integer)
if y2 = 0 then goto runtimeError2 (integer)
t97 := y2 + 8 (integer)
t98 := *t97
if t98 = 0 then goto runtimeError2 (integer)
t99 := t98 + 8 (integer)
t100 := *t99
if t100 = 0 then goto runtimeError2 (integer)
t101 := t100 + 4 (integer)
t102 := *t101
if t102 = 0 then goto runtimeError2 (integer)
if 66 < 0 then goto runtimeError4 (integer)
t103 := *t102
if 66 >= t103 then goto runtimeError4 (integer)
t103 := 66 * 4 (integer)
t103 := t103 + 4 (integer)
t103 := t102 + t103 (integer)
t104 := *t103
if t104 = 0 then goto runtimeError2 (integer)
t105 := t104 + 8 (integer)
t106 := *t105
if t106 = 0 then goto runtimeError2 (integer)
t107 := t106 + 4 (integer)
t108 := *t107
if t108 = 0 then goto runtimeError2 (integer)
if 77 < 0 then goto runtimeError4 (integer)
t109 := *t108
if 77 >= t109 then goto runtimeError4 (integer)
t109 := 77 * 4 (integer)
t109 := t109 + 4 (integer)
t109 := t108 + t109 (integer)
t110 := *t109
if t110 = 0 then goto runtimeError2 (integer)
t111 := t110 + 8 (integer)
t112 := *t111
*t96 := t112
! ASSIGNMENT STMT...
t113 := 0
if 5 <= 0 then goto runtimeError5 (integer)
t113 := t113 + 5 (integer)
t114 := alloc (16)
if t114 = 0 then goto runtimeError1 (integer)
t115 := t114 + 0 (integer)
*t115 := 123
t116 := 0
if 6 <= 0 then goto runtimeError5 (integer)
t116 := t116 + 6 (integer)
t117 := alloc (16)
if t117 = 0 then goto runtimeError1 (integer)
t118 := t117 + 0 (integer)
*t118 := 246
t119 := 0
if 7 <= 0 then goto runtimeError5 (integer)
t119 := t119 + 7 (integer)
t120 := t119 * 4 (integer)
t120 := t120 + 4 (integer)
t120 := alloc (t120)
if t120 = 0 then goto runtimeError1 (integer)
t121 := t120
*t120 := t119
t122 := 7
Label_5:
t120 := t120 + 4 (integer)
*t120 := y3
t122 := t122 - 1 (integer)
if t122 > 0 then goto Label_5 (integer)
t118 := t117 + 4 (integer)
*t118 := t121
t118 := t117 + 8 (integer)
*t118 := y2
t118 := t117 + 12 (integer)
*t118 := 0
t123 := t116 * 4 (integer)
t123 := t123 + 4 (integer)
t123 := alloc (t123)
if t123 = 0 then goto runtimeError1 (integer)
t124 := t123
*t123 := t116
t125 := 6
Label_6:
t123 := t123 + 4 (integer)
*t123 := t117
t125 := t125 - 1 (integer)
if t125 > 0 then goto Label_6 (integer)
t115 := t114 + 4 (integer)
*t115 := t124
t126 := alloc (16)
if t126 = 0 then goto runtimeError1 (integer)
t127 := t126 + 0 (integer)
*t127 := 357
t128 := 0
if 8 <= 0 then goto runtimeError5 (integer)
t128 := t128 + 8 (integer)
t129 := t128 * 4 (integer)
t129 := t129 + 4 (integer)
t129 := alloc (t129)
if t129 = 0 then goto runtimeError1 (integer)
t130 := t129
*t129 := t128
t131 := 8
Label_7:
t129 := t129 + 4 (integer)
*t129 := y1
t131 := t131 - 1 (integer)
if t131 > 0 then goto Label_7 (integer)
t127 := t126 + 4 (integer)
*t127 := t130
t127 := t126 + 8 (integer)
*t127 := y2
t127 := t126 + 12 (integer)
*t127 := 0
t115 := t114 + 8 (integer)
*t115 := t126
t115 := t114 + 12 (integer)
*t115 := 1
t132 := t113 * 4 (integer)
t132 := t132 + 4 (integer)
t132 := alloc (t132)
if t132 = 0 then goto runtimeError1 (integer)
t133 := t132
*t132 := t113
t134 := 5
Label_8:
t132 := t132 + 4 (integer)
*t132 := t114
t134 := t134 - 1 (integer)
if t134 > 0 then goto Label_8 (integer)
x1 := t133
! ASSIGNMENT STMT...
t135 := alloc (16)
if t135 = 0 then goto runtimeError1 (integer)
t136 := t135 + 0 (integer)
*t136 := 431
t137 := 0
if 9 <= 0 then goto runtimeError5 (integer)
t137 := t137 + 9 (integer)
t138 := alloc (16)
if t138 = 0 then goto runtimeError1 (integer)
t139 := t138 + 0 (integer)
*t139 := 987
t140 := 0
if 10 <= 0 then goto runtimeError5 (integer)
t140 := t140 + 10 (integer)
t141 := t140 * 4 (integer)
t141 := t141 + 4 (integer)
t141 := alloc (t141)
if t141 = 0 then goto runtimeError1 (integer)
t142 := t141
*t141 := t140
t143 := 10
Label_9:
t141 := t141 + 4 (integer)
*t141 := y3
t143 := t143 - 1 (integer)
if t143 > 0 then goto Label_9 (integer)
t139 := t138 + 4 (integer)
*t139 := t142
t139 := t138 + 8 (integer)
*t139 := y1
t139 := t138 + 12 (integer)
*t139 := 0
t144 := t137 * 4 (integer)
t144 := t144 + 4 (integer)
t144 := alloc (t144)
if t144 = 0 then goto runtimeError1 (integer)
t145 := t144
*t144 := t137
t146 := 9
Label_10:
t144 := t144 + 4 (integer)
*t144 := t138
t146 := t146 - 1 (integer)
if t146 > 0 then goto Label_10 (integer)
t136 := t135 + 4 (integer)
*t136 := t145
t147 := alloc (16)
if t147 = 0 then goto runtimeError1 (integer)
t148 := t147 + 0 (integer)
*t148 := 789
t149 := 0
if 11 <= 0 then goto runtimeError5 (integer)
t149 := t149 + 11 (integer)
t150 := t149 * 4 (integer)
t150 := t150 + 4 (integer)
t150 := alloc (t150)
if t150 = 0 then goto runtimeError1 (integer)
t151 := t150
*t150 := t149
t152 := 11
Label_11:
t150 := t150 + 4 (integer)
*t150 := y2
t152 := t152 - 1 (integer)
if t152 > 0 then goto Label_11 (integer)
t148 := t147 + 4 (integer)
*t148 := t151
t148 := t147 + 8 (integer)
*t148 := y1
t148 := t147 + 12 (integer)
*t148 := 1
t136 := t135 + 8 (integer)
*t136 := t147
t136 := t135 + 12 (integer)
*t136 := 1
y1 := t135
! MAIN EXIT...
mainExit
=======================================