Next:
Exercise 3.
Up:
Quiz11
Previous:
Exercise 1.
Exercise 2.
We consider the following translation scheme.
S
A
{
C
.
i
:=
A
.
s
}
C
S
AB
{
C
.
i
:=
A
.
s
}
C
A
int
{
A
.
s
:=
int
.
val
}
B
id
{}
C
int
{
C
.
s
:=
C
.
i
+
int
.
val
}
where
S
,
A
,
B
,
C
are non-terminals,
int
and
id
are terminals,
C
.
i
is an inherited attribute,
A
.
s
and
int
.
val
are synthesized attributes. Write a YACC program for this translation scheme.
Answer 2
Next:
Exercise 3.
Up:
Quiz11
Previous:
Exercise 1.
Marc Moreno Maza
2004-12-02