# HG changeset patch # User Christian Urban # Date 1351065004 -3600 # Node ID 9eefb4d96a19b75e0325799c50a0d50a0ca28df9 # Parent a97a6de47c289b7d014286bc78528b1bdc2ad56d tuned diff -r a97a6de47c28 -r 9eefb4d96a19 slides05.pdf Binary file slides05.pdf has changed diff -r a97a6de47c28 -r 9eefb4d96a19 slides05.tex --- a/slides05.tex Wed Oct 24 04:00:13 2012 +0100 +++ b/slides05.tex Wed Oct 24 08:50:04 2012 +0100 @@ -111,7 +111,7 @@ \item a finite set of states \bl{$Q$} \item one of these states is the start state \bl{$q_0$} \item some states are accepting states \bl{$F$} -\item there is transition function \bl{$\delta$} +\item a transition function \bl{$\delta$} \end{itemize}\pause \onslide<2->{ @@ -156,7 +156,7 @@ \item a finite set of states \item one of these states is the start state \item some states are accepting states -\item there is transition \alert{relation}\medskip +\item a transition \alert{relation}\medskip \end{itemize} @@ -426,6 +426,74 @@ \end{frame}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\qq}{\mbox{\texttt{"}}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\mode{ +\begin{frame}[c] +\frametitle{\begin{tabular}{c}Grammars\end{tabular}} + +\begin{center} +\bl{\begin{tabular}{lcl} +$E$ & $\rightarrow$ & $F + (F \cdot \qq*\qq \cdot F) + (F \cdot \qq\backslash\qq \cdot F)$\\ +$F$ & $\rightarrow$ & $T + (T \cdot \qq\texttt{+}\qq \cdot T) + (T \cdot \qq\texttt{-}\qq \cdot T)$\\ +$T$ & $\rightarrow$ & $num + (\qq\texttt{(}\qq \cdot E \cdot \qq\texttt{)}\qq)$\\ +\end{tabular}} +\end{center} + +\bl{$E$}, \bl{$F$} and \bl{$T$} are non-terminals\\ +\bl{$E$} is start symbol\\ +\bl{$num$}, \bl{(}, \bl{)}, \bl{+} \ldots are terminals\bigskip\\ + + +\bl{\texttt{(2*3)+(3+4)}} + +\end{frame}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\mode{ +\begin{frame}[c] + +\begin{center} +\bl{\begin{tabular}{lcl} +$E$ & $\rightarrow$ & $F + (F \cdot \qq*\qq \cdot F) + (F \cdot \qq\backslash\qq \cdot F)$\\ +$F$ & $\rightarrow$ & $T + (T \cdot \qq\texttt{+}\qq \cdot T) + (T \cdot \qq\texttt{-}\qq \cdot T)$\\ +$T$ & $\rightarrow$ & $num + (\qq\texttt{(}\qq \cdot E \cdot \qq\texttt{)}\qq)$\\ +\end{tabular}} +\end{center} + +\begin{center} +\begin{tikzpicture}[level distance=8mm, blue] + \node {E} + child {node {F} + child {node {T} + child {node {\qq(\qq\,E\,\qq)\qq} + child {node{F \qq*\qq{} F} + child {node {T} child {node {2}}} + child {node {T} child {node {3}}} + } + } + } + child {node {\qq+\qq}} + child {node {T} + child {node {\qq(\qq\,E\,\qq)\qq} + child {node {F} + child {node {T \qq+\qq{} T} + child {node {3}} + child {node {4}} + } + }} + }}; +\end{tikzpicture} +\end{center} + +\begin{textblock}{5}(1, 5) +\bl{\texttt{(2*3)+(3+4)}} +\end{textblock} + +\end{frame}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \end{document}