# HG changeset patch # User Christian Urban # Date 1637580248 0 # Node ID ea320c9427d29d7fa538c0656c1762782817cbbf # Parent 3d5ecb8f1f2fb86874705a097e5dff8d19ff6ed7 update diff -r 3d5ecb8f1f2f -r ea320c9427d2 cws/cw02.pdf Binary file cws/cw02.pdf has changed diff -r 3d5ecb8f1f2f -r ea320c9427d2 cws/cw02.tex --- 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{;} diff -r 3d5ecb8f1f2f -r ea320c9427d2 cws/cw03.pdf Binary file cws/cw03.pdf has changed diff -r 3d5ecb8f1f2f -r ea320c9427d2 progs/parser-combinators/comb1.sc --- 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") diff -r 3d5ecb8f1f2f -r ea320c9427d2 progs/while/test-small.j --- 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 diff -r 3d5ecb8f1f2f -r ea320c9427d2 slides/slides07.pdf Binary file slides/slides07.pdf has changed diff -r 3d5ecb8f1f2f -r ea320c9427d2 style.sty --- 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}