Next:
About this document ...
Up:
Quiz6
Previous:
Exercise 2.
Exercise 3.
Consider the following syntax-directed definition for the point size and height of boxes containing mathematical formulas.
Production
Semantic Rule
S
B
B
.
ps
:= 10
S
.
ht
:=
B
.
ht
B
B
1
B
2
B
1
.
ps
:=
B
.
ps
B
2
.
ps
:=
B
.
ps
B
.
ht
:=
max
(
B
1
.
ht
,
B
2
.
ht
)
B
B
1
B
2
B
1
.
ps
:=
B
.
ps
B
2
.
ps
:=
shrink
(
B
.
ps
)
B
.
ht
:=
disp
(
B
1
.
ht
,
B
2
.
ht
)
B
B
.
ht
:=
.
h
×
B
.
ps
Write a translation scheme for this syntax-directed definition.
Answer 3
Next:
About this document ...
Up:
Quiz6
Previous:
Exercise 2.
Marc Moreno Maza
2004-12-02