PLP 2e Errata
As of January 2008 Programming Language Pragmatics is in the
third printing of its second edition. To tell which printing you
have, check the copyright page. Right above the box at the bottom
of the page there is a line of numbers. If the last number is a 1
you have the first printing. If the last number is a 2 you have
the second printing. If the last number is a 3 you have the third
printing.
(To report a bug, send mail to
.)
First, second, and third printing
Main book
-
Page 26, figure 1.3: following the path from the root of the tree
[ program—more_ids—
;
],
replace the final semicolon with a comma.
Similarly, on the path
[ program—block—variables—more_ids—;
],
replace the final semicolon with another comma.
-
Page 52, figure caption: add a final "
0
" to the regular
expression at the end of the third sentence.
-
Page 73, Figure 2.20, 34th line of table (last line with "
sum
write sun / 2
" in the center column): delete the first
occurrence of "sum
".
-
Page 87, Figure 2.25, basis of State 6: replace
"stmt expr
add_op term" with
"expr expr
add_op term".
-
Pages 145-6, Example 3.30 and following discussion. Fortran
actually doesn't permit the claimed coercion of arguments. The
discussion remains correct if Fortran portion of the example is
converted to C.
-
Page 185, Figure 4.12,
":="
production, 3rd semantic rule:
append "+
expr.errors" to each of lines 5 and 7.
-
Page 285, Example 6.78: replace "
while line[0] != '$'
"
with
"while (line[0] != '$')
"
-
Page 316, Example 7.7, displayed code: add missing braces around
"
{ register = r; }
"
and
"{ return register; }".
-
Page 461, Exercise 8.3: replace "
main()
" with "int
main()
".
-
Page 496, Example 9.30: replace "
new char[strlen(n)]
"
with "new char[strlen(n)+1]
".
-
Page 510, Figure 9.6, class
call_foo
: delete fourth
field ( void (*ptr)(int, double, char);
) entirely.
-
Page 544, third block of displayed code: replace "
[()]
"
with "()
"; replace "null-typed action
sequence
" with "null-typed action
".
-
Page 549, second displayed equation in Section 10.6: replace
"y=x2" with
"y>0 x=y2".
-
Page 576, 20th line of figure: replace "
risky(A)
"
with "risky(C)
".
-
Page 579, second block of displayed code: replace
"
clause(snowy(rochester))
" with
"clause(snowy(rochester), true)
".
-
Page 612, 4th line of "Counterintuitive implementation" sidebar:
replace "8.2.5" with "8.2.4".
-
Page 617, 6th line of Example 12.24: replace "the thread is allowed"
with "the thread that is allowed".
-
Page 630, 4th line of Figure 12.16: replace
"data"
with
"bdata".
-
Page 634, 2nd line of Figure 12.17: replace
"data"
with
"bdata".
-
Page 649, Figure 12.20: bottom two arrows on left side of figure
(reply and its acknowledgment) should each be reversed (point the
opposite direction).
-
Page 651, 4th line of final paragraph: replace "12.3.2" with "12.3.5".
-
Page 687, displayed line of code: add missing braces in
"
'{ print $2 }'
".
-
Page 697, 9th line of Figure 13.8: delete quote marks around
"
pat
".
-
Page 724, replace 5th and 6th sentences with "Scheme, Perl, Python,
Ruby, Javascript, and R all provide unlimited extent for variables
captured in closures."
-
Page 748, review question 59: replace "typle" with "tuple".
-
Page 771, 15th line of Figure 14.5 (continued): replace
"reg_name"
with
"reg_names".
-
Page 788, Figure 14.8.
Right child of first
:=
node: replace "(0)" with "0";
4th line of table: replace "2" with "3";
5th line of table: replace "2" with "3";
8th line of table: replace "1" with "2".
CD
First and second printing only
Main book
-
Page 59, after 8th-to-last line of Figure 2.12: add new line:
"remove
remembered_chars from image".
-
Page 85, 2nd full paragraph, 6th line: replace "in the middle" with
"in front of a terminal".
-
Page 92. Replace last two sentences of final paragraph with
"It is worth noting that epsilon productions commonly prevent a grammar
from being LR(0): if such a production shares a state with an item
in which the dot precedes a terminal, we won't be able to tell
whether to “recognize” ε without peeking ahead."
-
Page 125, 2nd-to-last line of Figure 3.6: 3rd argument to
sprintf
should be the letter
‘l
’, not the digit
‘1
’.
-
Page 129, 9th line of Figure 3.8: replace "
STACK
" with
"stack
".
-
Page 143, second sentence of Section 3.6.2: replace with "In C, for
example, the plus sign (
+
) is used to name several
different functions, including signed and unsigned integer and
floating-point addition."
-
Pages 152–153, displayed code in Exercise 3.6: replace
"
insert(next_widget(), L)
" (both occurrences) with
"L = insert(next_widget(), L)
".
-
Page 165, 4th line of 'Static Analysis' section: delete ", C,".
-
Pages 218–219: replace 5 occurrences of "physical" with
"architectural": captions of Figures 5.5 and 5.6, 2nd and 5th lines
of first paragraph on page 218, 5th line of first full pagagraph on
page 219.
-
Page 239, Example 6.11: replace last two sentences with:
"In this expression
f(a)
returns a pointer to some
element of an array of pointers to structures (records). The
assignment places the value 2 into the c
-th element of
field b
of the structure pointed at by the third array
element after the one to which f
's return value points.
-
Page 271, 8th-to-last line: replace "Section 2.16" with "Example 2.16".
-
Page 303: Delete Exercise 6.32 (it's also on the CD, where it belongs).
-
Page 327: 7th line of first paragraph after Example 7.24: delete
"add or".
-
Page 376: 2nd-to-last sentence of Example 7.87: replace "an array
type" with "an array or pointer type".
-
Page 545: lines 3–4 of Section 10.5: replace
"(sec-continuations)" with "(Section 6.2.2)".
-
Page 554: delete top line of text (accidentally duplicated from
bottom of previous pge).
-
Page 725: line 3 of main text: replace "access" with "write".
CD
- Figure 3.19, p. 25-CD: after the assignment "best := e", add "exit
inner loop".
First printing only
Main book
-
Page 71, 5th line of Figure 2.18: add
"record"
at end of line.
- Page 76, 2nd-to-last line of Figure 2.23: capital ‘A’
to left of arrow should be italic.
- Page 294, "Normal-order evaluation" sidebar, line 5: delete
the word "sidebar".
- Page 313, 2nd-to-last line: replace "&169#;" with "©".
- Page 328, sidebar: replace "usually works" with "usually incurs
no run-time cost"; replace "The cast produces no run-time code; it merely
causes" with "The overall construct causes".
- Page 340, 3rd line of sidebar: replace "can’t can’t"
with "can’t".
- Page 490, displayed code, function
new_polar
: replace
two occurrences of "ro" with "rho".
- Page 534, first paragraph: Replace first sentence with "The first
argument to
do
is a list of triples, each of which
specifies a new variable, an initial value for that variable,
and an expression to be evaluated and placed in a fresh instance
of the variable at the end of each iteration."
Replace last sentence with "Only after all new values are computed
are the new variable instances created."
- Page 714, last full paragraph: change to read "Our document begins
with an
<?xml...?>
declaration,
which indicates the version of XML and the character encoding used in
the rest of the document. The declaration is included for the
benefit of tools that process the document; it isn't part of the XML
source itself. (Note the syntactic resemblance to the
processing instructions used in Section 13.3.2 to provide
input to the PHP interpreter.)"
- Page 717, last sentence: replace with "The document begins with
a declaration to specify the XML version and character encoding,
and a processing instruction to specify the XSL stylesheet to be
used to format the file."
- Page 719, 2nd paragraph: replace 3rd and 4th sentences with
"In a manner analagous to that of the XML document, the script
begins with a declaration to specify the XML version and character
encoding, and an
xsl:stylesheet
element to specify the
XSL version and namespace."
- Page 721, question 41: replace "directives" with "instructions".
- Page 738, Example 13.69: replace "2" with "1".
- Page 844, column 1, line 13: delete "cache misses,".
CD
- Page 4-CD, second block of displayed code: replace "
(A * X)
"
with "(A * X*X)
".
- Page 226-CD, first word on page: replace
"p30"
with
"v30".
- Excercise 15.4, p. 253-CD: replace "Section 6.61" with "Section
6.5.1".
Thanks to Steven Alexander, Gerald Baumgartner, Yi Dai, Eileen Head,
Nathan Hoot, Kelly Jones, Peter Ketcham, Eleazar Enrique Leal,
Antonio Leitao, Annie Liu, Nuno Lopes, Dan Mullowney, Arthur Nunes-Harwitt,
Zongyan Qiu, Harsh Raju, David Sattari, Ray Toal, Garrett Wollman, and
Jingguo Yao for their help in catching these mistakes.
Back to the book home page