--- a/slides/slides05.tex Mon Oct 20 00:10:57 2014 +0100
+++ b/slides/slides05.tex Mon Oct 20 00:28:03 2014 +0100
@@ -547,6 +547,81 @@
\end{frame}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}[c]
+\frametitle{Environment}
+
+Obtaining the ``recorded'' parts of a regular expression:
+
+\begin{center}
+\begin{tabular}{lcl}
+ \bl{$env(Empty)$} & \bl{$\dn$} & \bl{$[]$}\\
+ \bl{$env(Char(c))$} & \bl{$\dn$} & \bl{$[]$}\\
+ \bl{$env(Left(v))$} & \bl{$\dn$} & \bl{$env(v)$}\\
+ \bl{$env(Right(v))$} & \bl{$\dn$} & \bl{$env(v)$}\\
+ \bl{$env(Seq(v_1,v_2))$}& \bl{$\dn$} & \bl{$env(v_1) \,@\, env(v_2)$}\\
+ \bl{$env([v_1,\ldots ,v_n])$} & \bl{$\dn$} &
+ \bl{$env(v_1) \,@\ldots @\, env(v_n)$}\\
+ \bl{$env(Rec(x:v))$} & \bl{$\dn$} & \bl{$(x:|v|) :: env(v)$}\\
+\end{tabular}
+\end{center}
+
+\end{frame}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}[c]
+
+\begin{itemize}
+\item Regular expression for email addresses
+
+\begin{center}
+\begin{tabular}{l}
+(name: \bl{$[a\mbox{-}z0\mbox{-}9\_\!\_\,.-]^+$})\bl{$\cdot @\cdot$}\\
+\qquad(domain: \bl{$[a\mbox{-}z0\mbox{-}9\,.-]^+$}) \bl{$\cdot .\cdot$}\\
+\qquad\qquad(top\_level: \bl{$[a\mbox{-}z\,.]^{\{2,6\}}$})
+\end{tabular}
+\end{center}
+
+\bl{\[
+\texttt{christian.urban@kcl.ac.uk}
+\]}
+
+\item result environment:
+
+\begin{center}
+\begin{tabular}{l}
+\bl{$[(name:\texttt{christian.urban}),$}\\
+\bl{$\phantom{[}(domain:\texttt{kcl}),$}\\
+\bl{$\phantom{[}(top\_level:\texttt{ac.uk})]$}
+\end{tabular}
+\end{center}
+\end{itemize}
+
+\end{frame}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}[c]
+\frametitle{Coursework}
+
+\begin{center}
+\begin{tabular}{@ {}l@ {\hspace{2mm}}c@ {\hspace{2mm}}l@ {}}
+\bl{$nullable([c_1 c_2 \ldots c_n])$} & \bl{$\dn$} & $?$\\
+\bl{$nullable(r^+)$} & \bl{$\dn$} & $?$\\
+\bl{$nullable(r^?)$} & \bl{$\dn$} & $?$\\
+\bl{$nullable(r^{\{n,m\}})$} & \bl{$\dn$} & $?$\\
+\bl{$nullable(\sim{}r)$} & \bl{$\dn$} & $?$\medskip\\
+\bl{$der\, c\, ([c_1 c_2 \ldots c_n])$} & \bl{$\dn$} & $?$\\
+\bl{$der\, c\, (r^+)$} & \bl{$\dn$} & $?$\\
+\bl{$der\, c\, (r^?)$} & \bl{$\dn$} & $?$\\
+\bl{$der\, c\, (r^{\{n,m\}})$} & \bl{$\dn$} & $?$\\
+\bl{$der\, c\, (\sim{}r)$} & \bl{$\dn$} & $?$\\
+\end{tabular}
+\end{center}
+
+\end{frame}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}