Errata to Modern Compiler Design
The following errors and corrections are known to us.
In the 1st printing:
-
(20000914) pg. 62, top:
Figures 2.5 through 2.10 contain ==> Figures 2.5 through 2.12 contain
-
(20001027) pg. 160, top: Figure 2.90:
State 0 should have a transition to state 7 on '(' (as shown correctly
in Figure 2.89).
(Reported by Sara Kalvala.)
-
(20001019) pg. 177, Figures 2.105, 2.106 and 2.107:
There should be no indices 1 and 2 to the βs in the boxes.
Click
here
for the corrected Figure 2.105,
here
for the corrected Figure 2.106, and
here
for the corrected Figure 2.107.
-
(20001102) pg. 240, Figure 3.36:
The arrow marked "initially" is wrong, and the figure is confusing.
Replaced by a double figure.
Click
here
for the corrected Figure 3.36.
-
(20001116) pg. 291, Figure 4.9:
Intermediate Code generation ==>
Intermediate Code generation and Register Allocation
Click
here
for the corrected Figure 4.9.
-
(20001214) pg. 600, top + 15:
and combine them in the notion ==>
and combine them in the notion `clause'.
In the 2nd printing:
-
(20020123) pg. 10, Figure 1.5:
The node label 'identifier' above the node labelled '4' should read 'constant'.
-
(20041215) pg. 20, Figure 1.18:
switch (oper) ==> switch (expr->oper)
-
(20020513) pg. 95, Figure 2.41:
The caption should read "Lex input for the token set used in Section 2.1.5".
The same error occurs on pg 94 + 12.
-
(20020513) pg. 131 + 19:
"adds ... to" ==> "subtracts ... from"
-
(20020513) pg. 133, Figure 2.65:
In the row for "input", expression must be followed by "EoF" in both cases.
-
(20020705) pgs 164 and 165, top: Figures 2.93 and 2.94:
State 0 in Figure 2.93 should have the action "shift" on '('.
State 0 in Figure 2.94 should have the action/goto s7 on '('.
(See also erratum dd. 20001027, pg. 160, Figure 2.90.)
(Reported by Laurent Birtz.)
-
(20020513) pg. 168, Figure 2.97:
state 2 should have second ring, since it is a reduce state for lookahead '$'.
-
(20011009) pg. 224, Section 3.1.5.3:
The I[1], I[2], I[3], S[1], and S[2] in the partitionings should be lower case:
i[1], i[2], i[3], s[1], and s[2].
-
(20040324) pg. 315, Figure 4.37:
The tests in Maximal non_large tree (Node) should be against Size of Available register set rather than against Size of Auxiliary register set.
(Reported by Marco Rossi.)
-
(20020513) pg. 323, top + 12, 13, Figure 4.43:
the previous assignment to V, if present. ==>
all previous uses of V, if present.
The original dependencies allowed coding sequences like
PUSH a; PUSH 1; ADD; STORE n; PUSH n; PUSH 1; ADD; STORE n (third assignment);
LOAD n (wrong value).
Click
here
for the corrected Figure 4.43.
Also click
here
and
here
for two figures showing the stages between Figure 4.43 and Figure 4.44.
There are also replacements for
Figure4.44,
Figure4.57
and
Figure4.58.
Code for the basic blocks algorithms can be found in the directory
code/fg4/BasicBlocks in
code.zip
or
code.tar.
-
(20020624) pg. 400, Figure 5.1:
The arrow marked "size" should be extended left to the left end of "chunk".
-
(20020624) pg. 418, Figure 5.10:
"Pointer .reference count" should be decremented in two places.
Click
here
for the corrected Figure 5.10.
-
(20020515) pg. 436, Exercise 5.9:
For "chunk under p" read "chunk under q" and vice versa.
-
(20031231) pg. 504, Figure 6.38, last line:
(Node, False label, True label); ==> (Node .left, False label, True label);
-
(20020624) pg. 541 -2:
["r", "e", "d"] should be ['r', 'e', 'd'] .
-
(20020515) pg. 577, paragraph starting "When a global function ..."
This paragraph applies only when n >= m.
Errata to Modern Compiler Design / Dick Grune / dick@dickgrune.com