coursework/cw02.tex
changeset 578 6e5e3adc9eb1
parent 567 4573d36d0b2f
child 598 e3ad67cd5123
--- a/coursework/cw02.tex	Sat Oct 13 13:51:28 2018 +0100
+++ b/coursework/cw02.tex	Tue Oct 16 00:42:10 2018 +0100
@@ -172,18 +172,18 @@
 after each derivation step and rectify the computed values after each
 injection. Use this lexer to tokenize the programs in
 Figure~\ref{fib} and \ref{loop}. Give the tokens of these
-programs where whitespaces are filtered out.
+programs where whitespaces are filtered out.\bigskip
 
 
-\begin{figure}[p]
-\mbox{\lstinputlisting[language=while]{../progs/fib.while}}
+\begin{figure}[h]
+\mbox{\lstinputlisting[language=While,xleftmargin=10mm]{../progs/fib.while}}
 \caption{Fibonacci program in the WHILE language.\label{fib}}
 \end{figure}
 
-\begin{figure}[p]
-\mbox{\lstinputlisting[language=while]{../progs/loops.while}}
+\begin{figure}[h]
+\mbox{\lstinputlisting[language=While,xleftmargin=10mm]{../progs/loops.while}}
 \caption{The three-nested-loops program in the WHILE language. 
-Usually used for timing measurements.\label{loop}}
+(Usually used for timing measurements.)\label{loop}}
 \end{figure}
 
 \end{document}