浏览代码

errata ch. 1 from Michael Vanier

Jeremy Siek 4 年之前
父节点
当前提交
3b259b54fe
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      book.tex

+ 5 - 5
book.tex

@@ -514,19 +514,19 @@ definition for integer constants.
 (struct Int (value))
 (struct Int (value))
 \end{lstlisting}
 \end{lstlisting}
 An integer node includes just one thing: the integer value.
 An integer node includes just one thing: the integer value.
-To create a AST node for the integer $8$, we write \code{(Int 8)}.
+To create an AST node for the integer $8$, we write \code{(Int 8)}.
 \begin{lstlisting}
 \begin{lstlisting}
 (define eight (Int 8))
 (define eight (Int 8))
 \end{lstlisting}
 \end{lstlisting}
 We say that the value created by \code{(Int 8)} is an
 We say that the value created by \code{(Int 8)} is an
 \emph{instance} of the \code{Int} structure.
 \emph{instance} of the \code{Int} structure.
 
 
-The following is the \code{struct} definition for primitives operations.
+The following is the \code{struct} definition for primitive operations.
 \begin{lstlisting}
 \begin{lstlisting}
 (struct Prim (op args))
 (struct Prim (op args))
 \end{lstlisting}
 \end{lstlisting}
 A primitive operation node includes an operator symbol \code{op}
 A primitive operation node includes an operator symbol \code{op}
-and a list of children \code{args}. For example, to create
+and a list of child \code{args}. For example, to create
 an AST that negates the number $8$, we write \code{(Prim '- (list eight))}.
 an AST that negates the number $8$, we write \code{(Prim '- (list eight))}.
 \begin{lstlisting}
 \begin{lstlisting}
 (define neg-eight (Prim '- (list eight)))
 (define neg-eight (Prim '- (list eight)))
@@ -599,7 +599,7 @@ left-hand-side.
 A name such as $\Exp$ that is defined by the grammar rules is a
 A name such as $\Exp$ that is defined by the grammar rules is a
 \emph{non-terminal}.  \index{non-terminal}
 \emph{non-terminal}.  \index{non-terminal}
 %
 %
-The name $\Int$ is a also a non-terminal, but instead of defining it
+The name $\Int$ is also a non-terminal, but instead of defining it
 with a grammar rule, we define it with the following explanation.  We
 with a grammar rule, we define it with the following explanation.  We
 make the simplifying design decision that all of the languages in this
 make the simplifying design decision that all of the languages in this
 book only handle machine-representable integers.  On most modern
 book only handle machine-representable integers.  On most modern
@@ -844,7 +844,7 @@ it is defined using a sequence of match clauses that correspond to a
 grammar, and the body of each clause makes a recursive call on each
 grammar, and the body of each clause makes a recursive call on each
 child node.\footnote{This principle of structuring code according to
 child node.\footnote{This principle of structuring code according to
   the data definition is advocated in the book \emph{How to Design
   the data definition is advocated in the book \emph{How to Design
-    Programs} \url{http://www.ccs.neu.edu/home/matthias/HtDP2e/}.}.
+    Programs} \url{https://htdp.org/2020-8-1/Book/index.html}.}.
 Below we also define a second function, named \code{Rint?}, that
 Below we also define a second function, named \code{Rint?}, that
 determines whether an AST is an \LangInt{} program.  In general we can
 determines whether an AST is an \LangInt{} program.  In general we can
 expect to write one recursive function to handle each non-terminal in
 expect to write one recursive function to handle each non-terminal in