Binary file handouts/ho07.pdf has changed
Binary file slides/slides07.pdf has changed
--- a/slides/slides07.tex Tue Nov 17 00:36:16 2020 +0000
+++ b/slides/slides07.tex Wed Nov 18 01:54:03 2020 +0000
@@ -50,44 +50,42 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{frame}[c]
+\begin{frame}[t]
\frametitle{Bird's Eye View}
+\mbox{}\\[-16mm]\mbox{}
\begin{center}
-\begin{tikzpicture}
-\node (rexp) {\bl{\bf Lexer}};
-\node (nfa) [right=of rexp] {\bl{\bf Parser}};
-\node (dfa) [right=of nfa]
- {\bl{\begin{tabular}{c}\bf Machine Code/\\\bf Java Byte Code\end{tabular}}};
-\path[->, red, line width=2mm] (rexp) edge node [above=4mm, black] {\begin{tabular}{c@{\hspace{9mm}}}token\\[-1mm]
-sequence\end{tabular}} (nfa);
-\path[->, red, line width=2mm] (nfa) edge node [above=4mm, black] {\begin{tabular}{c}parse\\[-1mm] tree\end{tabular}}(dfa);
-\end{tikzpicture}\\
-\end{center}
+ \begin{tikzpicture}[scale=1,
+ node/.style={
+ rectangle,rounded corners=3mm,
+ very thick,draw=black!50,
+ minimum height=18mm, minimum width=20mm,
+ top color=white,bottom color=black!20,drop shadow}]
+ \node (0) at (-2.3,0) {};
+
+ \node (A) at (0,0) [node] {};
+ \node [below right] at (A.north west) {lexer};
+
+ \node (B) at (3,0) [node] {};
+ \node [below right=1mm] at (B.north west)
+ {\mbox{}\hspace{-1mm}parser};
+ \node (C) at (6,0) [node] {};
+ \node [below right] at (C.north west)
+ {\mbox{}\hspace{-1mm}code gen};
+
+ \node (1) at (8.4,0) {};
+
+ \draw [->,line width=4mm] (0) -- (A);
+ \draw [->,line width=4mm] (A) -- (B);
+ \draw [->,line width=4mm] (B) -- (C);
+ \draw [->,line width=4mm] (C) -- (1);
+ \end{tikzpicture}
+ \end{center}
+
\end{frame}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{frame}[c]
-\frametitle{CW3}
-Atomic parsers for tokens
-
-\begin{center}
-\bl{$\texttt{T\_Num(123)}::rest \;\Rightarrow\; \{(\texttt{T\_Num(123)}, rest)\}$}
-\end{center}\bigskip
-
-\begin{itemize}
-\item you consume one or more token from the\\
- input (stream)
-\item \bl{\texttt{T\_NUM(1), T\_OP(+), T\_NUM(2)}}\bigskip
-\item a good starting point would be \texttt{comb2.scala}
-\item in case CW2 did not work, use \texttt{toks.scala} as
- input to the parser
-\end{itemize}
-\end{frame}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -107,7 +105,7 @@
\fontsize{8}{10}\selectfont
%\footnotesize
-\mbox{}\\[-8mm]\mbox{}
+\mbox{}\\[-13mm]\mbox{}
\begin{columns}
\begin{column}{2cm}