updated
authorChristian Urban <christian.urban@kcl.ac.uk>
Wed, 25 Nov 2020 23:53:11 +0000
changeset 810 ba25eaf6043c
parent 809 2b9956d29038
child 811 86406d70d6f0
updated
progs/while/compile.sc
slides/slides07.pdf
slides/slides07.tex
--- a/progs/while/compile.sc	Tue Nov 24 21:22:31 2020 +0000
+++ b/progs/while/compile.sc	Wed Nov 25 23:53:11 2020 +0000
@@ -105,7 +105,6 @@
     compile_aexp(a1, env) ++ compile_aexp(a2, env) ++ compile_op(op)
 }
 
-
 // boolean expression compilation
 //  - the jump-label is for where to jump if the condition is not true
 def compile_bexp(b: BExp, env : Env, jmp: String) : String = b match {
Binary file slides/slides07.pdf has changed
--- a/slides/slides07.tex	Tue Nov 24 21:22:31 2020 +0000
+++ b/slides/slides07.tex	Wed Nov 25 23:53:11 2020 +0000
@@ -593,7 +593,7 @@
 For example
 
 \begin{lstlisting}[mathescape,numbers=none,language=While]
-if 1 = 1 then x := 2 else y := 3
+if 1 == 1 then x := 2 else y := 3
 \end{lstlisting}
 
 
@@ -627,11 +627,11 @@
 \begin{frame}[t]
 \frametitle{Compiling BExps}
 
-{\Large\bl{$a_1 = a_2$}}
+{\Large\bl{$a_1 == a_2$}}
 
 \begin{center}
 \bl{\begin{tabular}{lcl}
-$\text{compile}(a_1 = a_2, E, lab)$ & $\dn$\\ 
+$\text{compile}(a_1 == a_2, E, lab)$ & $\dn$\\ 
 \multicolumn{3}{l}{$\quad\text{compile}(a_1, E) \;@\;\text{compile}(a_2, E)\;@\; \text{if\_icmpne}\;lab$}
 \end{tabular}}
 \end{center}