slides/slides05.tex
changeset 149 b728c9dbf120
parent 148 36eb7bfb0e63
child 150 a2d792ed768e
equal deleted inserted replaced
148:36eb7bfb0e63 149:b728c9dbf120
   450 
   450 
   451 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   451 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   452 \mode<presentation>{
   452 \mode<presentation>{
   453 \begin{frame}[c]
   453 \begin{frame}[c]
   454 
   454 
       
   455 \begin{tikzpicture}[scale=1]
       
   456   
       
   457   \draw[line width=1mm] (-.3, 0) rectangle (1.5,2);
       
   458   \draw (4.2,1) node {Code Gen};
       
   459   \draw (0.6,1.7) node {\footnotesize Parser};
       
   460   \draw (-2.7,1.7) node {\footnotesize Lexer};
       
   461   
       
   462   \draw[line width=1mm] (-1.8, 0) rectangle (-3.6,2);
       
   463 
       
   464   \draw[white] (1.7,1) node (X) {};
       
   465   \draw[white] (3.2,1) node (Y) {};
       
   466   \draw[red, ->, line width = 2mm] (X) -- (Y);
       
   467  
       
   468   \draw[red, <-, line width = 2mm] (-0.6,1) -- (-1.6,1);
       
   469   \draw[red, <-, line width = 2mm] (-3.8,1) -- (-4.8,1);
       
   470 \end{tikzpicture}
       
   471 
   455 
   472 
   456 \end{frame}}
   473 \end{frame}}
   457 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   474 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   458 
   475 
   459 
   476 
   480 %\item problem with infix operations, for example i-12
   497 %\item problem with infix operations, for example i-12
   481 
   498 
   482 
   499 
   483 \end{frame}}
   500 \end{frame}}
   484 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   501 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   485 
   502 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   503 \mode<presentation>{
       
   504 \begin{frame}[t]
       
   505 \frametitle{\begin{tabular}{c}Nullable\end{tabular}}
       
   506 
       
   507 \small
       
   508 \ldots{}whether a regular expression can match the empty string:
       
   509 \begin{center}
       
   510 \begin{tabular}{@ {}l@ {\hspace{2mm}}c@ {\hspace{2mm}}l@ {}}
       
   511 \bl{$nullable(\varnothing)$}      & \bl{$\dn$} & \bl{$f\!\/alse$}\\
       
   512 \bl{$nullable(\epsilon)$}           & \bl{$\dn$} &  \bl{$true$}\\
       
   513 \bl{$nullable (c)$}                    & \bl{$\dn$} &  \bl{$f\!alse$}\\
       
   514 \bl{$nullable (r_1 + r_2)$}       & \bl{$\dn$} &  \bl{$nullable(r_1) \vee nullable(r_2)$} \\ 
       
   515 \bl{$nullable (r_1 \cdot r_2)$} & \bl{$\dn$} &  \bl{$nullable(r_1) \wedge nullable(r_2)$} \\
       
   516 \bl{$nullable (r^*)$}                 & \bl{$\dn$} & \bl{$true$} \\
       
   517 \end{tabular}
       
   518 \end{center}
       
   519 
       
   520 \end{frame}}
       
   521 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   522 
       
   523 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   524 \mode<presentation>{
       
   525 \begin{frame}[c]
       
   526 \frametitle{\begin{tabular}{c}Zeroable\end{tabular}}
       
   527 
       
   528 \small
       
   529 \ldots{}whether a regular expression can match nothing:
       
   530 \begin{center}
       
   531 \begin{tabular}{@ {}l@ {\hspace{2mm}}c@ {\hspace{2mm}}l@ {}}
       
   532 \bl{$zeroable(\varnothing)$}      & \bl{$\dn$} & \bl{$true$}\\
       
   533 \bl{$zeroable(\epsilon)$}           & \bl{$\dn$} &  \bl{$f\!alse$}\\
       
   534 \bl{$zeroable (c)$}                    & \bl{$\dn$} &  \bl{$f\!alse$}\\
       
   535 \bl{$zeroable (r_1 + r_2)$}       & \bl{$\dn$} &  \bl{$zeroable(r_1) \wedge zeroable(r_2)$} \\ 
       
   536 \bl{$zeroable (r_1 \cdot r_2)$} & \bl{$\dn$} &  \bl{$zeroable(r_1) \vee zeroable(r_2)$} \\
       
   537 \bl{$zeroable (r^*)$}                 & \bl{$\dn$} & \bl{$f\!alse$} \\
       
   538 \end{tabular}
       
   539 \end{center}
       
   540 
       
   541 
       
   542 \end{frame}}
       
   543 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   486 
   544 
   487 \newcommand{\qq}{\mbox{\texttt{"}}}
   545 \newcommand{\qq}{\mbox{\texttt{"}}}
   488 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   546 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   489 \mode<presentation>{
   547 \mode<presentation>{
   490 \begin{frame}[c]
   548 \begin{frame}[c]