The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

dynalt (5) [Avatar] Offline
Code Generation in Action - Errata

Garold L. Johnson `

Section 2.5.1 (page 41) C / C++ Cons - The languages are *not* suited to text parsing tasks.

Section 5.4.7 (page 110) name should use the name field (?) based on the comment in the next paragraph
<edit name="<% context[ 'field' ] %>" ... >
<edit name="<% context[ 'name' ] %>" ... >

Listing 8.2 (page 167) in def initialize
@perl_mapped = [] s/b indented 1 more space

Listing 9.2 (page 177)
if cChar == '' -- missing character in ''?

Listing 9.2 (page 17smilie Set escaped = false after copying the escaped character
if ( escaped )
text.append( line.charAt( index );
escaped = false;

Problem also in code: (line 12smilie, and (line 113).

Code File CTokenizer.rb (line 216)

@escaped = ( ch == "\" ) # Found a backslash.

This will fail on "Backslash at end \". The second backslash will set @escaped, and the closing quote will be missed.

Listing 9.2 (page 17smilie
if line.charAt( index ) == '' -- s/b '"'
inQuotes = inQuotes ? false : true;

Page 179 (next to last line) 'protected' is only partially bold.

Section 10.5.3 (page 200)
Class 'Book' shows 'name' as a member, but the schema in Section 10.5.7 (page 206) doesn't have 'name' for Book
Not all books have ISBNs, but the columns is non-null.

Section 10.5.6 (page 205)
One or more items should be indented under "For each table follows these steps:"

Section 13.4.3 (page 270) "Normalizes ... and replace ..." s/b "Normalizes ... and replaces ..."

Section F.1.4 (page 32smilie
Pattern "\S*.txt$" will determine if the file name ends in ".txt", but it matches a slightly different pattern than the other examples.