编译原理习题解答 页 1/1
第二章:习题 2-4 Table 表
var x,y;
procedure p;
var a;
procedure q;
var b;
begin
b:=10;
end;
procedure s;
var c,d;
procedure r;
var e,f;
begin
call q;
end;
begin
call r;
end;
begin
call s;
end;
begin
call p;
end
根据:Page289,变量 table:array[0..txmax] of record 结构体以及 block 函数得到下表,而表中各部分的含义,
见教材 Page18,Page19
Name Kink Val /Level Adr Size
x variable 0 3 0
y variable 0 4 0
p procedur 0 1 0
a variable 1 3 0
q procedur 1 3 4
s procedur 1 7 0
c variable 2 3 0
d variable 2 4 0
r procedur 2 0 0
- 1
- 2
前往页