slides01.tex
changeset 14 8ef75033f34e
parent 13 6d554a18b81e
equal deleted inserted replaced
13:6d554a18b81e 14:8ef75033f34e
   357 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   357 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   358 
   358 
   359 \newcommand{\bl}[1]{\textcolor{blue}{#1}}       
   359 \newcommand{\bl}[1]{\textcolor{blue}{#1}}       
   360 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   360 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   361 \mode<presentation>{
   361 \mode<presentation>{
   362 \begin{frame}[c]
   362 \begin{frame}[t]
   363 \frametitle{\begin{tabular}{c}Regular Expressions\end{tabular}}
   363 \frametitle{\begin{tabular}{c}Regular Expressions\end{tabular}}
   364 
   364 
   365 \begin{textblock}{6}(2,4)
   365 Their inductive definition:\medskip
       
   366 
       
   367 \begin{textblock}{6}(2,5)
   366   \begin{tabular}{@ {}rrl@ {\hspace{13mm}}l}
   368   \begin{tabular}{@ {}rrl@ {\hspace{13mm}}l}
   367   \bl{r} & \bl{$::=$}  & \bl{$\varnothing$}  & null\\
   369   \bl{r} & \bl{$::=$}  & \bl{$\varnothing$}  & null\\
   368          & \bl{$\mid$} & \bl{$\epsilon$}        & empty string / "" / []\\
   370          & \bl{$\mid$} & \bl{$\epsilon$}        & empty string / "" / []\\
   369          & \bl{$\mid$} & \bl{c}                         & character\\
   371          & \bl{$\mid$} & \bl{c}                         & character\\
   370          & \bl{$\mid$} & \bl{r$_1$ $\cdot$ r$_2$} & sequence\\
   372          & \bl{$\mid$} & \bl{r$_1$ $\cdot$ r$_2$} & sequence\\
   378 
   380 
   379 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   381 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   380 \mode<presentation>{
   382 \mode<presentation>{
   381 \begin{frame}[t]
   383 \begin{frame}[t]
   382 \frametitle{\begin{tabular}{c}Regular Expressions\end{tabular}}
   384 \frametitle{\begin{tabular}{c}Regular Expressions\end{tabular}}
       
   385 
       
   386 \small
       
   387 In Scala:
       
   388 
   383 
   389 
   384 {\lstset{language=Scala}\fontsize{8}{10}\selectfont
   390 {\lstset{language=Scala}\fontsize{8}{10}\selectfont
   385 \texttt{\lstinputlisting{app51.scala}}}
   391 \texttt{\lstinputlisting{app51.scala}}}
   386 
   392 
   387   
   393   
   458 \frametitle{\begin{tabular}{c}Exam\end{tabular}}
   464 \frametitle{\begin{tabular}{c}Exam\end{tabular}}
   459 
   465 
   460 \begin{itemize}
   466 \begin{itemize}
   461 \item The question ``Is this relevant for the exam?'' is not appreciated!\bigskip\\
   467 \item The question ``Is this relevant for the exam?'' is not appreciated!\bigskip\\
   462 
   468 
   463 Whatever is in the homework sheets (and is not marked optional) is relevant for the
   469 Whatever is in the homework sheets (and is not marked ``optional'') is relevant for the
   464 exam.\\ No code needs to be written.
   470 exam.\\ No code needs to be written in the exam.
   465 \end{itemize}
   471 \end{itemize}
   466 
   472 
   467 \end{frame}}
   473 \end{frame}}
   468 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   474 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   469 
   475