added
authorChristian Urban <christian dot urban at kcl dot ac dot uk>
Fri, 22 Nov 2013 20:27:30 +0000
changeset 200 7415871b1ef5
parent 199 89cafeb66f40
child 201 c813506e0ee8
added
coursework/cw02.pdf
coursework/cw02.tex
coursework/cw03.pdf
coursework/cw03.tex
Binary file coursework/cw02.pdf has changed
--- a/coursework/cw02.tex	Fri Nov 22 16:59:17 2013 +0000
+++ b/coursework/cw02.tex	Fri Nov 22 20:27:30 2013 +0000
@@ -67,7 +67,7 @@
 $\backslash\backslash$. (Thanks to Bryan who pointed out this error.)\bigskip\bigskip
 
 \noindent
-This coursework is worth 3\% and is due on 27 November at 16:00. You are asked to 
+This coursework is worth 3\% and is due on 29 November at 16:00. You are asked to 
 
 \begin{enumerate}
 \item implement a tokeniser for the WHILE language,
Binary file coursework/cw03.pdf has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/coursework/cw03.tex	Fri Nov 22 20:27:30 2013 +0000
@@ -0,0 +1,88 @@
+\documentclass{article}
+\usepackage{charter}
+\usepackage{hyperref}
+\usepackage{amssymb}
+\usepackage{amsmath}
+\usepackage{listings}
+\usepackage{xcolor}
+
+
+\newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}%
+\begin{document}
+
+\definecolor{javared}{rgb}{0.6,0,0} % for strings
+\definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
+\definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
+\definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
+  
+\lstdefinelanguage{scala}{
+  morekeywords={abstract,case,catch,class,def,%
+    do,else,extends,false,final,finally,%
+    for,if,implicit,import,match,mixin,%
+    new,null,object,override,package,%
+    private,protected,requires,return,sealed,%
+    super,this,throw,trait,true,try,
+    type,val,var,while,with,yield},
+  otherkeywords={=>,<-,<\%,<:,>:,\#,@},
+  sensitive=true,
+  morecomment=[l]{//},
+  morecomment=[n]{/*}{*/},
+  morestring=[b]",
+  morestring=[b]',
+  morestring=[b]"""
+}
+
+\lstdefinelanguage{while}{
+  morekeywords={while, if, then. else, read, write},
+  otherkeywords={=>,<-,<\%,<:,>:,\#,@},
+  sensitive=true,
+  morecomment=[l]{//},
+  morecomment=[n]{/*}{*/},
+  morestring=[b]",
+  morestring=[b]',
+  morestring=[b]"""
+}
+
+
+\lstset{language=Scala,
+	basicstyle=\ttfamily,
+	keywordstyle=\color{javapurple}\bfseries,
+	stringstyle=\color{javagreen},
+	commentstyle=\color{javagreen},
+	morecomment=[s][\color{javadocblue}]{/**}{*/},
+	numbers=left,
+	numberstyle=\tiny\color{black},
+	stepnumber=1,
+	numbersep=10pt,
+	tabsize=2,
+	showspaces=false,
+	showstringspaces=false}
+
+
+
+\section*{Coursework 3}
+
+\noindent
+This coursework is worth 4\% and is due on 13 December at 16:00. You are asked to 
+implement a compiler for the WHILE language. You are supposed to target the
+assembler language provided by the Jasmin for running on the Java Virtual Machine.
+
+
+\noindent
+You need to submit a document containing the answers for the questions 
+below. You can do the implementation in any programming language you like, but you need 
+to submit the source code with which you answered the questions. However, the coursework 
+will \emph{only} be judged according to the answers. You can submit your answers
+in a txt-file or as pdf.\bigskip
+
+
+\subsection*{Question 1 (marked with 1\%)}
+
+
+
+\end{document}
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: t
+%%% End: