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 |