Browse Source

Merge branch 'master' of github.com:IUCompilerCourse/Essentials-of-Compilation

Jeremy Siek 3 years ago
parent
commit
06bde23e6a
2 changed files with 16 additions and 17 deletions
  1. 3 3
      Makefile
  2. 13 14
      book.tex

+ 3 - 3
Makefile

@@ -12,9 +12,9 @@ continuous:
 
 clean:
 	$(LATEXMK) -C book
-	rm -f book.pdf *.log *.aux *.bbl *.lof *.out *.toc *.blg *.ilg *.ind \
-	      *.lot *.run.xml *.bcf *.fls *.fdb_latexmk *.idx *.ilg *.ind \
-	      *.idx *.ilg *.ind
+	rm -f book.pdf *.log *.aux *.bbl \
+	      *.lof *.out *.toc *.blg *.ilg *.ind *.idx \
+	      *.lot *.run.xml *.bcf *.fls *.fdb_latexmk
 
 # Build with a fixed snapshot of NixPkgs 17.03.  Known-to-work.
 # For a very clean version, run git clean -fxd followed by this:

+ 13 - 14
book.tex

@@ -14536,9 +14536,9 @@ mainconclusion:
 \index{subject}{lambda}
 \index{subject}{lexical scoping}
 
-This chapter studies lexically scoped functions, that is, functions
-whose body may refer to variables that are bound outside of the
-function, in an enclosing scope.
+This chapter studies lexically scoped functions. Lexical scoping means
+that a function's body may refer to variables whose binding site is
+outside of the function, in an enclosing scope.
 %
 Consider the example in Figure~\ref{fig:lexical-scoping} written in
 \LangLam{}, which extends \LangFun{} with lexically scoped functions
@@ -14586,7 +14586,6 @@ produces \code{20} whereas applying \code{h} to \code{15} produces
 \label{fig:lexical-scoping}
 \end{figure}
 
-
 The approach that we take for implementing lexically scoped functions
 is to compile them into top-level function definitions, translating
 from \LangLam{} into \LangFun{}.  However, the compiler must give
@@ -14745,10 +14744,10 @@ a type annotation for the variable on the left-hand side.}
   \gray{\LvarGrammarPython{}} \\ \hline
   \gray{\LifGrammarPython{}} \\ \hline
   \gray{\LwhileGrammarPython} \\ \hline
-  \gray{\LtupGrammarPython} \\ \hline
-  \gray{\LfunGrammarPython} \\ \hline
+  \gray{\LtupGrammarPython} \\   \hline
+  \gray{\LfunGrammarPython} \\   \hline
   \LlambdaGrammarPython \\
-  \begin{array}{rcl}
+  \begin{array}{lcl}
     \LangFunM{} &::=& \Def\ldots \Stmt\ldots
   \end{array}
 \end{array}
@@ -14777,7 +14776,7 @@ a type annotation for the variable on the left-hand side.}
   \gray{\LfunASTRacket} \\ \hline
   \LlambdaASTRacket \\
   \begin{array}{lcl}
-  \LangLamM{} &::=& \gray{ \PROGRAMDEFSEXP{\code{'()}}{\LP\Def\ldots\RP}{\Exp} }
+  \LangLamM{} &::=& \PROGRAMDEFSEXP{\code{'()}}{\LP\Def\ldots\RP}{\Exp}
   \end{array}
 \end{array}
 \]
@@ -14785,16 +14784,16 @@ a type annotation for the variable on the left-hand side.}
 {\if\edition\pythonEd
 \[
 \begin{array}{l}
-  \gray{\LintASTPython{}} \\ \hline
+  \gray{\LintASTPython} \\ \hline
   \gray{\LvarASTPython{}} \\ \hline
   \gray{\LifASTPython{}} \\ \hline
-  \gray{\LwhileASTPython} \\ \hline
-  \gray{\LtupASTPython} \\ \hline
+  \gray{\LwhileASTPython{}} \\ \hline
+  \gray{\LtupASTPython{}} \\ \hline
   \gray{\LfunASTPython} \\ \hline
   \LlambdaASTPython \\
-\begin{array}{rcl}
-  \LangFunM{} &::=& \PROGRAM{}{\LS \Def \ldots \Stmt \ldots \RS}
-\end{array}
+  \begin{array}{lcl}
+  \LangLamM{} &::=& \PROGRAM{}{\LS \Def \ldots \Stmt \ldots \RS}
+  \end{array}
 \end{array}
 \]
 \fi}