http://t3x.org/reload/errata.html

ERRATA

to PRACTICAL COMPILER CONSTRUCTION

Thanks to everybody who submitted corrections!

They will be included in a future version of the book. Typos and grammatical errors will not be listed here unless they obscure the meaning of the text.

Found something else? Please mail me!

Page 9, Figure 1.3 (submitted by Kevin T. Ryan and "kyz" on reddit)
IDENT('0') should be IDENT('a')
IDENT('9') should be IDENT('z')
Pages 20+ (submitted by Ori Avtalion)
Missing limitations: the SubC compiler does not support:
Page 111
if (cond(lv, LOGOR)) should be if (expr(lv))
Page 300, submitted and fixed by Warren Toomey

The pop() function will remove a value from the stack when one register is allocated, even if the stack is empty, resulting in a stack underflow. The following code corrects this erratum.

void pop(void) {
        if (S) {
                gen("pop  R%d");
                S--;
                R--;
                if (0 == R) R = N;
        }
        else {
                R--;
        }
}

contact  |  privacy