small medium large xlarge

Errata for The Definitive ANTLR Reference


The latest version of the book is P4.0, released over 4 years 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.

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

If you've found a new error, please submit it.

  • Typo
  • Tech. error
  • Suggestion
  • Maybe next edition
  • Not a problem
  • Reported in: P4.0 (23-Apr-11)
PDF page: 29
For grammar file T.g, if you're creating this manually, make sure there is a blank line at the end of the file. It seems that ending with a single-lin...more...
  • Reported in: P4.0 (27-Apr-12)
Paper page: 62
When running the Expr test for 'trees' the book text says: BEGIN QUOTE First ask ANTLR to translate Expr.g to Java code and compile as you did f...more...
  • Reported in: P4.0 (02-Jun-11)
Paper page: 83

Figure 4.2: r^ (last sentence) Rule r should must a single node, not a subtree.

  • Reported in: P4.0 (11-Feb-12)
PDF page: 141

r @init { Token myFirstToken = $start; // do me first }

should this not be:
Token myFirstToken = $r.start;--Achim Rumberger

  • Reported in: P4.0 (08-Jun-11)
PDF page: 153
footnote 3 contains a broken link. (I can't post the link or the link to the correct page because pragprog system think I'm spamming if I do so). Plea...more...
  • Reported in: P4.0 (01-Jul-11)
PDF page: 159

The link in the footnote is broken(page not found).--Yun

  • Reported in: P3.0 (02-Apr-11)
PDF page: 170

MyParser parser = new MParser(tokens,symtab);
should be
MyParser parser = new MyParser(tokens,symtab);

  • Reported in: P1.0 (17-Aug-12)
PDF page: 223
"Generating templates behaves just like generating trees using rewrite rules.Each rule implicitly returns a template or tree, and the -> rewrite opera...more...
  • Reported in: P4.0 (17-Feb-12)
PDF page: 301
Last paragraph, first sentence: The problem is that the looping subrule in declarator_specifiers... should be: The problem is that the looping subr...more...