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
/
misc.out.bak
< prev
next >
Wrap
Text File
|
2006-02-17
|
5KB
|
211 lines
PROGRAM IS
TYPE
MyArr IS ARRAY OF integer;
MyRec IS RECORD f1: integer; END;
VAR
b: boolean := FALSE;
a: MyArr := NIL;
r: MyRec := NIL;
g: integer := 0;
h: real := 0.0;
PROCEDURE foo (x: real; y: real; z: real; i: integer; j: integer) : boolean IS
VAR
a: real := 0.0;
k: integer := 0;
BEGIN
a := ((((x + y) + z) + h) * (x - (y - (z - h))));
k := ((3 - i) * (j + g));
RETURN b;
END;
BEGIN
b := FALSE;
b := TRUE;
a := NIL;
r := NIL;
b := foo (1.111, 2.222, 3.333, 4, 5);
b := (FALSE OR FALSE);
b := (TRUE OR FALSE);
b := (FALSE OR TRUE);
b := (TRUE OR TRUE);
b := (FALSE AND FALSE);
b := (TRUE AND FALSE);
b := (FALSE AND TRUE);
b := (TRUE AND TRUE);
b := NOT TRUE;
b := NOT FALSE;
END;
maxLexicalLevel = 1
===== String List Follows =====
===== Float List Follows =====
float5: 0.0
float4: 3.333
float3: 2.222
float2: 1.111
float1: 0.0
===== Intermediate Code Follows =====
! MAIN...
mainEntry
! VAR INITIALIZATION...
b := 0
! VAR INITIALIZATION...
a := 0
! VAR INITIALIZATION...
r := 0
! VAR INITIALIZATION...
g := 0
! VAR INITIALIZATION...
h := 0.0
! ASSIGNMENT STMT...
b := 0
! ASSIGNMENT STMT...
b := 1
! ASSIGNMENT STMT...
a := 0
! ASSIGNMENT STMT...
r := 0
! ASSIGNMENT STMT...
param 1,1.111
param 2,2.222
param 3,3.333
param 4,4
param 5,5
call p1_foo
resultTo t1
b := t1
! ASSIGNMENT STMT...
goto Label_4
Label_4:
goto Label_2
Label_1:
t2 := 1
goto Label_3
Label_2:
t2 := 0
Label_3:
b := t2
! ASSIGNMENT STMT...
goto Label_5
Label_8:
goto Label_6
Label_5:
t3 := 1
goto Label_7
Label_6:
t3 := 0
Label_7:
b := t3
! ASSIGNMENT STMT...
goto Label_12
Label_12:
goto Label_9
Label_9:
t4 := 1
goto Label_11
Label_10:
t4 := 0
Label_11:
b := t4
! ASSIGNMENT STMT...
goto Label_13
Label_16:
goto Label_13
Label_13:
t5 := 1
goto Label_15
Label_14:
t5 := 0
Label_15:
b := t5
! ASSIGNMENT STMT...
goto Label_18
Label_20:
goto Label_18
Label_17:
t6 := 1
goto Label_19
Label_18:
t6 := 0
Label_19:
b := t6
! ASSIGNMENT STMT...
goto Label_24
Label_24:
goto Label_22
Label_21:
t7 := 1
goto Label_23
Label_22:
t7 := 0
Label_23:
b := t7
! ASSIGNMENT STMT...
goto Label_26
Label_28:
goto Label_25
Label_25:
t8 := 1
goto Label_27
Label_26:
t8 := 0
Label_27:
b := t8
! ASSIGNMENT STMT...
goto Label_32
Label_32:
goto Label_29
Label_29:
t9 := 1
goto Label_31
Label_30:
t9 := 0
Label_31:
b := t9
! ASSIGNMENT STMT...
goto Label_34
Label_33:
t10 := 1
goto Label_35
Label_34:
t10 := 0
Label_35:
b := t10
! ASSIGNMENT STMT...
goto Label_36
Label_36:
t11 := 1
goto Label_38
Label_37:
t11 := 0
Label_38:
b := t11
! MAIN EXIT...
mainExit
! PROCEDURE...
procEntry p1_foo,lexLevel=1,frameSize=144
formal 1,x
formal 2,y
formal 3,z
formal 4,i
formal 5,j
! VAR INITIALIZATION...
a := 0.0
! VAR INITIALIZATION...
k := 0
! ASSIGNMENT STMT...
t12 := x + y (float)
t13 := t12 + z (float)
t14 := t13 + h (float)
t15 := z - h (float)
t16 := y - t15 (float)
t17 := x - t16 (float)
t18 := t14 * t17 (float)
a := t18
! ASSIGNMENT STMT...
t19 := 3 - i (integer)
t20 := j + g (integer)
t21 := t19 * t20 (integer)
k := t21
! RETURN...
returnExpr b
=======================================