We try to keep our books accurate, but sometimes mistakes creep in. This page lists the errors submitted by our astute readers. If you've found a new error, please submit it.

The latest version of the book is P2.0, released 8 months ago. If you've bought a PDF of the book and would like to upgrade it to this version (for free), visit your home page.

Key: Typo Tech. Error Suggestion Not a problem Next edition

By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:  

(To find out what version you have, look at the copyright page, a few pages in from the front of the book. If it says (say) 'Second Printing', then here it'll be P2.0. If there are interim PDF releases in that printing, they'll be 2.1, 2.2, and so on.)

PDF Paper Description Found in Fixed in
36
#78028: Throughout the book, cross-reference links to other pages are missing a space between the comma and the words "on page NN". Presumably, this i...more...
P2.0
09-Jan-15
40

#77986: The source for tour/EvalVisitor.java is no longer valid for Antlr 4.4. Where are the modified sources?

P2.0
29-Dec-14
49
#77316: In the tour/Data.g4 example, there's the following piece of code: sequence[int n] locals [int i = 1;] : ( {$i<=$n}? INT {$i++;} )* // mat...more...
P1.0
12-Sep-14
49
#77387: Hi, I am using Antlr4.4. I have adapted the example tour/Data.g4 as follows: sequence[int n] locals [int i = 42;] : ( {$i < $n}? I...more...
P2.0
19-Sep-14
52

#77988: “mode” should be purple-boldfaced to represent it as a keyword.--Ravi Ponamgi

P2.0
29-Dec-14
59
#78190: Ultimately, we need the ability to divine a language’s structure from a set of representative input files. There is a difference between g...more...
P2.0
16-Feb-15
68
#78251: Section 4.5 Cool Lexical Features Last paragraph on page 68: >>Each line of that output represents a token and contains the token index,...more...
P2.0
14-Mar-15
68
#78255: Would be clearer to either change "grun XML" to "grun XMLLexer", or to clarify that the suffix "Lexer" is implicit in TestRig: >>Here’s how...more...
P2.0
16-Mar-15
70
#77421: Chapter 5.4: the right association examples uses the old syntax: The book still shows the V4.2 style assoc while v4 has it changed runnin...more...
P1.0
22-Sep-14
74

#77405: On page 73 at the bottom of the page, the link to the java grammar
does not work. --Karl Stroetmann

P1.0
21-Sep-14
79
#77849: This rule (near the top of the page(: assign : ID (WS|COMMENT)? '=' (WS|COMMENT)? expr (WS|COMMENT)? ; should be: assign : ID (WS|COM...more...
P2.0
26-Nov-14
86

#77989: [final sentence of the page, the word "of" is missing, I suspect:] "... on the right side OF rule 'file'."--Ravi Ponamgi

P2.0
29-Dec-14
87
#77815: In the example "examples/CSV.g4", the syntax highlight seems to be incorrect, i.e. the second line is highlighted as if it was a string, but i...more...
P2.0
19-Nov-14
89
#78268: Reference to bad URL on antlr.org in footnote #3: 3. h-t-t-p://www.antlr.org/grammar/java Note: I couldn't enter the full URL due t...more...
P2.0
20-Mar-15
102
#77408: On page 102 the rule for `expr` is stated as follows: ~~~ expr: ID '(' exprList? ')' // func call like f(), f(x), f(1,2) | ID ...more...
P2.0
21-Sep-14
152
#77534: When I run antlr4 on Simple.g4 I get the error message: error(65): Simple.g4:18:52: unknown attribute text for rule stat in $stat.text err...more...
P2.0
03-Oct-14
157
#77535: The examples errors/TestE_Dialog.java and errors/TestE_Listener2.java do not compile because of the import directive import com.sun.istack....more...
P2.0
03-Oct-14
175
#78154: The sample errors/TestBail.java contains extends SimpleLexer I cannot find the class SimpleLexer in ANTLR4 java download. There is a class ...more...
P2.0
06-Feb-15
237
#78141: In method consume() the assignment charPositionInLine = 0 should be charPositionInLine = -1. This will correct the erroneous output of TestSim...more...
P1.0
02-Feb-15