next up previous
Next: About this document ... Up: Quiz9 Previous: Exercise 3.

Exercise 4.

Write a LEX program that recognizes the same language as the non-deterministic finite automaton shown on Figure 2. It is up to you to design how the generated scanner works and what it should return.

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

Figure 2: An automaton.
\begin{figure}\htmlimage
\centering\includegraphics[scale=.5]{RegularGrammarAndFA2.eps}
.
\end{figure}


next up previous
Next: About this document ... Up: Quiz9 Previous: Exercise 3.
Marc Moreno Maza
2004-12-02