coursework/cw02.tex
changeset 364 50ce3667c190
parent 363 0d6deecdb2eb
child 369 43c0ed473720
equal deleted inserted replaced
363:0d6deecdb2eb 364:50ce3667c190
   119 \subsection*{Question 3 (marked with 1\%)}
   119 \subsection*{Question 3 (marked with 1\%)}
   120 
   120 
   121 Extend your tokenizer from Q2 to also simplify regular expressions
   121 Extend your tokenizer from Q2 to also simplify regular expressions
   122 after each derivation step and rectify the computed values after each
   122 after each derivation step and rectify the computed values after each
   123 injection. Use this tokenizer to tokenize the programs in
   123 injection. Use this tokenizer to tokenize the programs in
   124 Figure~\ref{fib} and \ref{loop}.
   124 Figure~\ref{fib} and \ref{loop}. Give the tokens of these
       
   125 programs where whitespaces are filtered out.
   125 
   126 
   126 
   127 
   127 \begin{figure}[p]
   128 \begin{figure}[p]
   128 \begin{center}
   129 \begin{center}
   129 \mbox{\lstinputlisting[language=while]{../progs/fib.while}}
   130 \mbox{\lstinputlisting[language=while]{../progs/fib.while}}