545 |
545 |
546 |
546 |
547 \end{frame}} |
547 \end{frame}} |
548 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
548 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
549 |
549 |
|
550 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
551 \begin{frame}[c] |
|
552 \frametitle{Environment} |
|
553 |
|
554 Obtaining the ``recorded'' parts of a regular expression: |
|
555 |
|
556 \begin{center} |
|
557 \begin{tabular}{lcl} |
|
558 \bl{$env(Empty)$} & \bl{$\dn$} & \bl{$[]$}\\ |
|
559 \bl{$env(Char(c))$} & \bl{$\dn$} & \bl{$[]$}\\ |
|
560 \bl{$env(Left(v))$} & \bl{$\dn$} & \bl{$env(v)$}\\ |
|
561 \bl{$env(Right(v))$} & \bl{$\dn$} & \bl{$env(v)$}\\ |
|
562 \bl{$env(Seq(v_1,v_2))$}& \bl{$\dn$} & \bl{$env(v_1) \,@\, env(v_2)$}\\ |
|
563 \bl{$env([v_1,\ldots ,v_n])$} & \bl{$\dn$} & |
|
564 \bl{$env(v_1) \,@\ldots @\, env(v_n)$}\\ |
|
565 \bl{$env(Rec(x:v))$} & \bl{$\dn$} & \bl{$(x:|v|) :: env(v)$}\\ |
|
566 \end{tabular} |
|
567 \end{center} |
|
568 |
|
569 \end{frame} |
|
570 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
571 |
|
572 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
573 \begin{frame}[c] |
|
574 |
|
575 \begin{itemize} |
|
576 \item Regular expression for email addresses |
|
577 |
|
578 \begin{center} |
|
579 \begin{tabular}{l} |
|
580 (name: \bl{$[a\mbox{-}z0\mbox{-}9\_\!\_\,.-]^+$})\bl{$\cdot @\cdot$}\\ |
|
581 \qquad(domain: \bl{$[a\mbox{-}z0\mbox{-}9\,.-]^+$}) \bl{$\cdot .\cdot$}\\ |
|
582 \qquad\qquad(top\_level: \bl{$[a\mbox{-}z\,.]^{\{2,6\}}$}) |
|
583 \end{tabular} |
|
584 \end{center} |
|
585 |
|
586 \bl{\[ |
|
587 \texttt{christian.urban@kcl.ac.uk} |
|
588 \]} |
|
589 |
|
590 \item result environment: |
|
591 |
|
592 \begin{center} |
|
593 \begin{tabular}{l} |
|
594 \bl{$[(name:\texttt{christian.urban}),$}\\ |
|
595 \bl{$\phantom{[}(domain:\texttt{kcl}),$}\\ |
|
596 \bl{$\phantom{[}(top\_level:\texttt{ac.uk})]$} |
|
597 \end{tabular} |
|
598 \end{center} |
|
599 \end{itemize} |
|
600 |
|
601 \end{frame} |
|
602 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
603 |
|
604 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
605 \begin{frame}[c] |
|
606 \frametitle{Coursework} |
|
607 |
|
608 \begin{center} |
|
609 \begin{tabular}{@ {}l@ {\hspace{2mm}}c@ {\hspace{2mm}}l@ {}} |
|
610 \bl{$nullable([c_1 c_2 \ldots c_n])$} & \bl{$\dn$} & $?$\\ |
|
611 \bl{$nullable(r^+)$} & \bl{$\dn$} & $?$\\ |
|
612 \bl{$nullable(r^?)$} & \bl{$\dn$} & $?$\\ |
|
613 \bl{$nullable(r^{\{n,m\}})$} & \bl{$\dn$} & $?$\\ |
|
614 \bl{$nullable(\sim{}r)$} & \bl{$\dn$} & $?$\medskip\\ |
|
615 \bl{$der\, c\, ([c_1 c_2 \ldots c_n])$} & \bl{$\dn$} & $?$\\ |
|
616 \bl{$der\, c\, (r^+)$} & \bl{$\dn$} & $?$\\ |
|
617 \bl{$der\, c\, (r^?)$} & \bl{$\dn$} & $?$\\ |
|
618 \bl{$der\, c\, (r^{\{n,m\}})$} & \bl{$\dn$} & $?$\\ |
|
619 \bl{$der\, c\, (\sim{}r)$} & \bl{$\dn$} & $?$\\ |
|
620 \end{tabular} |
|
621 \end{center} |
|
622 |
|
623 \end{frame} |
|
624 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
550 |
625 |
551 \end{document} |
626 \end{document} |
552 |
627 |
553 %%% Local Variables: |
628 %%% Local Variables: |
554 %%% mode: latex |
629 %%% mode: latex |