# HG changeset patch # User Christian Urban # Date 1349855407 -3600 # Node ID 0f05e90b960d85d8514ee7e3979cbbc6d4973238 # Parent 06be91bbb1cd6c9251ba245e93af481c0e5e3459 added diff -r 06be91bbb1cd -r 0f05e90b960d hw03.pdf Binary file hw03.pdf has changed diff -r 06be91bbb1cd -r 0f05e90b960d hw03.tex --- a/hw03.tex Wed Oct 10 08:39:24 2012 +0100 +++ b/hw03.tex Wed Oct 10 08:50:07 2012 +0100 @@ -23,8 +23,20 @@ $zeroable(r)$ \;if and only if\; $L(r) = \varnothing$ \end{center} +\item Define the tokens and regular expressions for a language +consisting of numbers, left-parenthesis (, right-parenthesis ), +identifiers and the operations $+$, $-$ and $*$. Can the following strings +in this language be lexed? + +\begin{itemize} +\item \texttt{"}$(a + 3) * b$\texttt{"} +\item \texttt{"}$)()++ -33$\texttt{"} +\item \texttt{"}$(a / 3) * 3$\texttt{"} +\end{itemize} \end{enumerate} +In case they can, can you give the corresponding token sequences. + \end{document} %%% Local Variables: