Skip to content

Commit 97125ac

Browse files
Minor edits to presentation
1 parent dd3f140 commit 97125ac

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

docs/documentation.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,11 @@ \section{Additions to the Syntax Given During Lectures}\label{sec:additions}
264264
\node[state, initial] (q0) {$q_0$};
265265
\node[state, accepting, right of=q0] (q1) {$q_1$};
266266
267-
\draw (q0) edge[loop above] node{$\ast - \texttt{"a"}$} (q0)
267+
\draw (q0) edge[loop above] node{$\ast - \texttt{"\#"}$} (q0)
268268
(q0) edge[above] node{\texttt{\#}} (q1)
269269
(q1) edge[loop above] node{$\ast$} (q1);
270270
\end{tikzpicture}
271-
\caption[Finite state automaton to recognize comments]{Finite state automaton to recognize comments. The $\ast$ symbol denotes all characters. The notation $\ast - \texttt{"a"}$ denotes all characters except ``a''.}
271+
\caption[Finite state automaton to recognize comments]{Finite state automaton to recognize comments. The $\ast$ symbol denotes all characters. The notation $\ast - \texttt{"\#"}$ denotes all characters except ``\#''.}
272272
\label{fig:comment-automaton}
273273
\end{figure}
274274

docs/presentation.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ \section{The Environment}
322322
\column{0.45\textwidth}
323323
\small
324324
\begin{itemize}
325-
\item Variables have a name, a type (\texttt{int}) and a value
325+
\item Variables have a name, a type (\texttt{int} or \texttt{str}) and a value
326326
\item An environment is a set of variables
327327
\item An environment can be updated by adding or modifying a
328328
variable
@@ -385,8 +385,8 @@ \section{Implementation}
385385
\end{itemize}
386386
\item A parser is a Functor, meaning we can apply a function
387387
\texttt{fmap}
388-
\item A parser is an Applicative, meaning it can be applied
389-
sequentially (discarding the previously computed results)
388+
\item A parser is an Applicative, meaning we can apply functions
389+
wrapped in parsers to values wrapped in parsers sequentially.
390390
\end{itemize}
391391
\column{0.65\textwidth}
392392
\lstinputlisting[firstline=10,lastline=14]{Parser/Core.hs}
@@ -403,7 +403,7 @@ \section{Implementation}
403403
\item A parser is a Monad, meaning we can sequentially apply
404404
different parsers
405405
\item A parser can also be defined as an \texttt{Alternative}, that
406-
allows to use the syntax \lstinline{a <|> b} to express the
406+
allows to use the syntax \lstinline!a <|> b! to express the
407407
fact that the parser \texttt{b} should be applied if \texttt{a}
408408
fails.
409409
\end{itemize}
@@ -576,11 +576,11 @@ \section{Implementation}
576576
\node[state, initial] (q0) {$q_0$};
577577
\node[state, accepting, right of=q0] (q1) {$q_1$};
578578
579-
\draw (q0) edge[loop above] node{$\ast - \texttt{"a"}$} (q0)
579+
\draw (q0) edge[loop above] node{$\ast - \texttt{"\#"}$} (q0)
580580
(q0) edge[above] node{\texttt{\#}} (q1)
581581
(q1) edge[loop above] node{$\ast$} (q1);
582582
\end{tikzpicture}
583-
\caption[Finite state automaton to recognize comments]{Finite state automaton to recognize comments. The $\ast$ symbol denotes all characters. The notation $\ast - \texttt{"a"}$ denotes all characters except ``a''.}
583+
\caption[Finite state automaton to recognize comments]{Finite state automaton to recognize comments. The $\ast$ symbol denotes all characters. The notation $\ast - \texttt{"\#"}$ denotes all characters except ``\#''.}
584584
\label{fig:comment-automaton}
585585
\end{figure}
586586
\end{frame}

src/Parser/Bexp.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ bexp :: Parser Bool
99
bexp = do x <- bterm
1010
symbol "or"
1111
if x
12-
then do R.bterm
12+
then do R.bexp
1313
return x
14-
else do y <- bterm
14+
else do y <- bexp
1515
return $ x || y
1616
<|> bterm
1717

0 commit comments

Comments
 (0)