next up previous
Next: Exercise 2. Up: Quiz11 Previous: Guidelines.

Exercise 1.

We consider the following syntax-directed definition
Production Semantic Rule
A $ \longmapsto$ L M L.i := f1(A.i)
  M.i := f2(L.s)
  A.s := f3(M.s)
A $ \longmapsto$ Q R R.i := f4(A.i)
  Q.i := f5(R.s)
  A.i := f6(Q.s)
If this is an L-attributed grammar, then write a translation scheme for it, otherwise explain why this is not an L-attributed grammar.

Answer 1  
\fbox{
\begin{minipage}{13 cm}
\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\mbox{...
...x{ } \\
\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\end{minipage}}


next up previous
Next: Exercise 2. Up: Quiz11 Previous: Guidelines.
Marc Moreno Maza
2004-12-02