--- a/handouts/ho02.tex Sat Sep 26 23:45:40 2020 +0100
+++ b/handouts/ho02.tex Sun Sep 27 09:15:32 2020 +0100
@@ -32,7 +32,7 @@
regular expression $(a^*)^*\cdot b$ and strings composed of $n$
\pcode{a}s, like
\[
-\pcode{"}\!\underbrace{\pcode{a}\ldots\pcode{a}}_{n}\!\pcode{"}
+\underbrace{\pcode{a}\ldots\pcode{a}}_{n}
\]
\noindent
@@ -480,14 +480,14 @@
algorithm:
\[
-\textit{matches}\,r\,s \dn \textit{nullable}(\textit{ders}\,s\,r)
+\textit{matcher}\,r\,s \dn \textit{nullable}(\textit{ders}\,s\,r)
\]
\noindent
and we can claim that
\[
-\textit{matches}\,r\,s\quad\text{if and only if}\quad s\in L(r)
+\textit{matcher}\,r\,s\quad\text{if and only if}\quad s\in L(r)
\]
\noindent holds, which means our algorithm satisfies the
@@ -508,7 +508,7 @@
implemented in a functional programming language, like Scala.
Given the implementation of regular expressions in Scala shown
in the first lecture and handout, the functions and subfunctions
-for \pcode{matches} are shown in Figure~\ref{scala1}.
+for \pcode{matcher} are shown in Figure~\ref{scala1}.
\begin{figure}[p]
\lstinputlisting[numbers=left,linebackgroundcolor=
@@ -1045,16 +1045,16 @@
\textit{nullable}(\textit{ders}\,s\,r)
\]
-\noindent But this is just the definition of $matches$
+\noindent But this is just the definition of $matcher$
\[
-matches\,s\,r \dn nullable(\textit{ders}\,s\,r)
+matcher\,s\,r \dn nullable(\textit{ders}\,s\,r)
\]
\noindent In effect we have shown
\[
-matches\,s\,r\;\;\text{if and only if}\;\;
+matcher\,s\,r\;\;\text{if and only if}\;\;
s\in L(r)
\]