Binary file coursework/cw01.pdf has changed
--- a/coursework/cw01.tex Thu Aug 03 01:21:19 2017 +0100
+++ b/coursework/cw01.tex Mon Sep 18 14:02:46 2017 +0100
@@ -10,7 +10,7 @@
\section*{Coursework 1 (Strand 1)}
-This coursework is worth 4\% and is due on 25 October at
+This coursework is worth 4\% and is due on 19 October at
16:00. You are asked to implement a regular expression matcher
and submit a document containing the answers for the questions
below. You can do the implementation in any programming
Binary file coursework/cw02.pdf has changed
--- a/coursework/cw02.tex Thu Aug 03 01:21:19 2017 +0100
+++ b/coursework/cw02.tex Mon Sep 18 14:02:46 2017 +0100
@@ -6,7 +6,7 @@
\section*{Coursework 2 (Strand 1)}
-\noindent This coursework is worth 5\% and is due on 4
+\noindent This coursework is worth 5\% and is due on 2
November at 16:00. You are asked to implement the Sulzmann \&
Lu lexer for the WHILE language. You can do the
implementation in any programming language you like, but you
Binary file coursework/cw03.pdf has changed
--- a/coursework/cw03.tex Thu Aug 03 01:21:19 2017 +0100
+++ b/coursework/cw03.tex Mon Sep 18 14:02:46 2017 +0100
@@ -6,7 +6,7 @@
\section*{Coursework 3}
-\noindent This coursework is worth 5\% and is due on 24
+\noindent This coursework is worth 5\% and is due on 23
November at 16:00. You are asked to implement a parser for the
WHILE language and also an interpreter. You can do the
implementation in any programming language you like, but you
Binary file coursework/cw04.pdf has changed
--- a/coursework/cw04.tex Thu Aug 03 01:21:19 2017 +0100
+++ b/coursework/cw04.tex Mon Sep 18 14:02:46 2017 +0100
@@ -9,7 +9,7 @@
\section*{Coursework 4 (Strand 1)}
-\noindent This coursework is worth 6\% and is due on 13
+\noindent This coursework is worth 6\% and is due on 7
December at 16:00. You are asked to implement a compiler for
the WHILE language that targets the assembler language
provided by Jasmin or Krakatau (both have very similar
Binary file coursework/cw05.pdf has changed
Binary file hws/hw02.pdf has changed
--- a/hws/hw02.tex Thu Aug 03 01:21:19 2017 +0100
+++ b/hws/hw02.tex Mon Sep 18 14:02:46 2017 +0100
@@ -8,7 +8,9 @@
\HEADER
\begin{enumerate}
-
+\item What is the difference between \emph{basic} regular expressions
+ and \emph{extended} regular expressions?
+
\item What is the language recognised by the regular
expressions $(\ZERO^*)^*$.
--- a/progs/re0.scala Thu Aug 03 01:21:19 2017 +0100
+++ b/progs/re0.scala Mon Sep 18 14:02:46 2017 +0100
@@ -17,7 +17,7 @@
// some convenience for typing in regular expressions
implicit def string2rexp(s : String) : Rexp = STR(s)
-implicit def RexpOps(r: Rexp) = new {
+implicit def RexpOps(r: Rexp) : Rexp = new {
def | (s: Rexp) = ALT(r, s)
def % = STAR(r)
def %(n: Int) = REP(r, n)
@@ -27,7 +27,7 @@
def ~ (s: Rexp) = SEQ(r, s)
}
-implicit def stringOps(s: String) = new {
+implicit def stringOps(s: String) : Rexp = new {
def | (r: Rexp) = ALT(s, r)
def | (r: String) = ALT(s, r)
def % = STAR(s)