slides05.tex
changeset 47 9eefb4d96a19
parent 46 a97a6de47c28
equal deleted inserted replaced
46:a97a6de47c28 47:9eefb4d96a19
   109 
   109 
   110 \begin{itemize}
   110 \begin{itemize}
   111 \item a finite set of states \bl{$Q$}
   111 \item a finite set of states \bl{$Q$}
   112 \item one of these states is the start state \bl{$q_0$}
   112 \item one of these states is the start state \bl{$q_0$}
   113 \item some states are accepting states \bl{$F$}
   113 \item some states are accepting states \bl{$F$}
   114 \item there is transition function \bl{$\delta$}
   114 \item a transition function \bl{$\delta$}
   115 \end{itemize}\pause
   115 \end{itemize}\pause
   116 
   116 
   117 \onslide<2->{
   117 \onslide<2->{
   118 \begin{center}
   118 \begin{center}
   119 \begin{tabular}{l}
   119 \begin{tabular}{l}
   154 
   154 
   155 \begin{itemize}
   155 \begin{itemize}
   156 \item a finite set of states
   156 \item a finite set of states
   157 \item one of these states is the start state
   157 \item one of these states is the start state
   158 \item some states are accepting states
   158 \item some states are accepting states
   159 \item there is transition \alert{relation}\medskip 
   159 \item a transition \alert{relation}\medskip 
   160 \end{itemize}
   160 \end{itemize}
   161 
   161 
   162 
   162 
   163 \begin{center}
   163 \begin{center}
   164 \begin{tabular}{c}
   164 \begin{tabular}{c}
   424 \item complement DFA
   424 \item complement DFA
   425 \end{itemize}
   425 \end{itemize}
   426 
   426 
   427 \end{frame}}
   427 \end{frame}}
   428 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   428 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   429 \newcommand{\qq}{\mbox{\texttt{"}}}
       
   430 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   431 \mode<presentation>{
       
   432 \begin{frame}[c]
       
   433 \frametitle{\begin{tabular}{c}Grammars\end{tabular}}
       
   434 
       
   435 \begin{center}
       
   436 \bl{\begin{tabular}{lcl}
       
   437 $E$ & $\rightarrow$ &  $F + (F \cdot \qq*\qq \cdot F) + (F \cdot \qq\backslash\qq \cdot F)$\\
       
   438 $F$ & $\rightarrow$ & $T + (T \cdot \qq\texttt{+}\qq \cdot T) + (T \cdot \qq\texttt{-}\qq \cdot T)$\\
       
   439 $T$ & $\rightarrow$ & $num + (\qq\texttt{(}\qq \cdot E \cdot \qq\texttt{)}\qq)$\\
       
   440 \end{tabular}}
       
   441 \end{center}
       
   442 
       
   443 \bl{$E$}, \bl{$F$} and \bl{$T$} are non-terminals\\
       
   444 \bl{$E$} is start symbol\\
       
   445 \bl{$num$}, \bl{(}, \bl{)}, \bl{+} \ldots are terminals\bigskip\\
       
   446 
       
   447 
       
   448 \bl{\texttt{(2*3)+(3+4)}}
       
   449 
       
   450 \end{frame}}
       
   451 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   452 
       
   453 
       
   454 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   455 \mode<presentation>{
       
   456 \begin{frame}[c]
       
   457 
       
   458 \begin{center}
       
   459 \bl{\begin{tabular}{lcl}
       
   460 $E$ & $\rightarrow$ &  $F + (F \cdot \qq*\qq \cdot F) + (F \cdot \qq\backslash\qq \cdot F)$\\
       
   461 $F$ & $\rightarrow$ & $T + (T \cdot \qq\texttt{+}\qq \cdot T) + (T \cdot \qq\texttt{-}\qq \cdot T)$\\
       
   462 $T$ & $\rightarrow$ & $num + (\qq\texttt{(}\qq \cdot E \cdot \qq\texttt{)}\qq)$\\
       
   463 \end{tabular}}
       
   464 \end{center}
       
   465 
       
   466 \begin{center}
       
   467 \begin{tikzpicture}[level distance=8mm, blue]
       
   468   \node {E}
       
   469     child {node {F} 
       
   470      child {node {T} 
       
   471                  child {node {\qq(\qq\,E\,\qq)\qq}
       
   472                             child {node{F \qq*\qq{} F}
       
   473                                   child {node {T} child {node {2}}}
       
   474                                   child {node {T} child {node {3}}} 
       
   475                                }
       
   476                           }
       
   477               }
       
   478      child {node {\qq+\qq}}
       
   479      child {node {T}
       
   480        child {node {\qq(\qq\,E\,\qq)\qq} 
       
   481        child {node {F}
       
   482        child {node {T \qq+\qq{} T}
       
   483                     child {node {3}}
       
   484                     child {node {4}} 
       
   485                  }
       
   486                  }}
       
   487     }};
       
   488 \end{tikzpicture}
       
   489 \end{center}
       
   490 
       
   491 \begin{textblock}{5}(1, 5)
       
   492 \bl{\texttt{(2*3)+(3+4)}}
       
   493 \end{textblock}
       
   494 
       
   495 \end{frame}}
       
   496 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   429 
   497 
   430 \end{document}
   498 \end{document}
   431 
   499 
   432 %%% Local Variables:  
   500 %%% Local Variables:  
   433 %%% mode: latex
   501 %%% mode: latex