Next: Exercise 3.
Up: Quiz10
Previous: Exercise 1.
We consider the alphabet
= {a, b}
and the grammar G below.
Let L be the language generated by G over
.
G |
![$\displaystyle \left\{\vphantom{ \begin{array}{rcl} S & \longmapsto & AB \\ A &...
...longmapsto & b B B \\ B & \longmapsto & {\varepsilon} \\ \end{array} }\right.$](img8.png) ![$\displaystyle \begin{array}{rcl} S & \longmapsto & AB \\ A & \longmapsto & a A...
...\\ B & \longmapsto & b B B \\ B & \longmapsto & {\varepsilon} \\ \end{array}$](img9.png) |
|
|
Give a grammar G' generating
L
{
} and
with no
-productions, that is
no rules of the form
X
,
where
denotes the empty word.
Is G' left-recursive?
Answer 2
![\fbox{
\begin{minipage}{13 cm}
\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\mbox{ } \...
...\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\end{minipage}}](img13.png)
Next: Exercise 3.
Up: Quiz10
Previous: Exercise 1.
Marc Moreno Maza
2004-12-02