update
authorChristian Urban <christian.urban@kcl.ac.uk>
Mon, 22 Nov 2021 11:24:08 +0000
changeset 850 ea320c9427d2
parent 849 3d5ecb8f1f2f
child 851 48539905c447
update
cws/cw02.pdf
cws/cw02.tex
cws/cw03.pdf
progs/parser-combinators/comb1.sc
progs/while/test-small.j
slides/slides07.pdf
style.sty
Binary file cws/cw02.pdf has changed
--- a/cws/cw02.tex	Thu Nov 11 15:58:22 2021 +0000
+++ b/cws/cw02.tex	Mon Nov 22 11:24:08 2021 +0000
@@ -73,11 +73,11 @@
   \texttt{<},
   \texttt{=},
   \texttt{;},
-  \texttt{,}
+  \texttt{,} (comma),
   \texttt{$\backslash$} and
   \texttt{:}
 
-\item strings are enclosed by \texttt{"\ldots"} and consisting of
+\item strings are enclosed by double quotes, like \texttt{"\ldots"}, and consisting of
   symbols, whitespaces and digits
 \item parentheses are \texttt{(}, \texttt{\{}, \texttt{)} and \texttt{\}}
 \item there are semicolons \texttt{;}
Binary file cws/cw03.pdf has changed
--- a/progs/parser-combinators/comb1.sc	Thu Nov 11 15:58:22 2021 +0000
+++ b/progs/parser-combinators/comb1.sc	Mon Nov 22 11:24:08 2021 +0000
@@ -172,15 +172,15 @@
 lazy val S : Parser[String, String] =
   (p"1" ~ S ~ S).map{ case ((x, y), z) => x + y + z } || p""
 
-println(time(S.parse("1" * 10)))
-println(time(S.parse_all("1" * 10)))
+//println(time(S.parse("1" * 10)))
+//println(time(S.parse_all("1" * 10)))
 
 // non-ambiguous
 lazy val U : Parser[String, String] =
   (p"1" ~ U).map{ case (x, y) => x + y } || p""
 
-println(time(U.parse("1" * 10)))
-println(time(U.parse_all("1" * 10)))
+//println(time(U.parse("1" * 10)))
+//println(time(U.parse_all("1" * 10)))
 println(U.parse("1" * 25))
 
 U.parse("11")
--- a/progs/while/test-small.j	Thu Nov 11 15:58:22 2021 +0000
+++ b/progs/while/test-small.j	Mon Nov 22 11:24:08 2021 +0000
@@ -15,9 +15,9 @@
    .limit stack 200
 
    ; 1 + ((2 * 3) + (4 - 3))
-   ldc 1       
-   ldc 2
-   ldc 3
+   ldc 5       
+   ldc 6
+   ldc 7
    imul
    ldc 4
    ldc 3
@@ -26,4 +26,4 @@
    iadd
    invokestatic test/test/write(I)V 
    return
-.end method
\ No newline at end of file
+.end method
Binary file slides/slides07.pdf has changed
--- a/style.sty	Thu Nov 11 15:58:22 2021 +0000
+++ b/style.sty	Mon Nov 22 11:24:08 2021 +0000
@@ -76,8 +76,8 @@
 
 % CW deadlines
 \def\cwONE{18 October}
-\def\cwTWO{\textcolor{red}{11 November}}
-\def\cwTHREE{29 November}
+\def\cwTWO{\textcolor{red}{11 November}}  % 8 November
+\def\cwTHREE{\textcolor{red}{1 December}} %29 November
 \def\cwFOUR{13 December}
 \def\cwFIVE{24 January}