ANTLR Changelog

New in version 4.5

January 23rd, 2015
  • Bug Fixes:
  • Excess token consumption during recovery
  • exception when importing grammar
  • Generated tokenNames field in lexers is useless
  • Maven build has test failures due to order of token types
  • Suppress warning 109 for matching options during import
  • Parser.getTrace()
  • exception when importing grammar
  • ANTLRInputStream.getSourceName() has @NotNull annotation, but returns null
  • deprecate ErrorType.ALL_OPS_NEED_SAME_ASSOC
  • Multiline comments along with token declaration in lexer
  • NullUsageProcessor not compatible with java>6
  • Cannot start a new lexer mode right after some comments comment
  • Docstring for TokenStreamRewriter is incorrect

New in version 4.4 (July 17th, 2014)

  • Bug Fixes:
  • NullPtr and bad tree parse upon parser rule ref in lexer rule in combined grammar (#661)
  • Specifying an unknown target crashed the tool. (163ec98)

New in version 4.3 (July 10th, 2014)

  • Features:
  • Parser profiler (#583)
  • Tool/Runtime version mismatch detection (#572, #601, #634, #635)
  • Improvements:
  • Improved support for additional targets (#554, #566, #569, #609, #610)
  • Add clearDFA() method to easily clear the DFA cache (#584)
  • Improved documentation
  • Bug Fixes:
  • Fix issue with tokens named ATN (#561)
  • Fix generated JavaDoc for listener and visitor methods for context objects created by labeled alternatives in a rule (#543)
  • Fix errors in support for parsing off-channel tokens (#544, #622, #626)
  • Fix references that alias the enclosing rule name (#571)
  • Fix issues with use of (#542)
  • Fix issues with unsupported and/or ignored semantic predicates (#588, #590)
  • Allow multiple actions and/or predicates to appear at the end of alternatives in a left-recursive rule (#625)
  • Fix bugs in infrequently used IntervalSet code (#623)
  • Fix issues with file encoding handling (#563, #618)
  • Breaking Changes:
  • Within an embedded action or semantic predicate, references to the enclosing rule can no longer be written as $ruleName. Instead, use the special symbol $ctx to refer to the enclosing rule. Parsers already generated from grammars prior to this change are not affected, but the grammar will need to be updated prior to generating code with ANTLR 4.3. This change was required as part of correcting #571.
  • IntervalSet.getMinElement now returns the first element, even if that element is negative. Code which relied on this method to return a non-negative value even if the set contained negative values will need to be updated.

New in version 4.2.2 (April 7th, 2014)

  • Bug Fixes:
  • Improve the handling of grammars containing multiple explicit references to EOF (#531, #534, #537, #539)
  • Improve the ability of generated parsers to report localized errors in the presence of semantic predicates (#529, #530, #533, parrt/antlr4#134, #538)
  • Other minor fixes and cleanup (#528, #532, #538, #540)

New in version 4.2.1 (March 27th, 2014)

  • Bug Fixes:
  • Fix the ParserRuleContext which is returned by the parser interpreter when parsing starts with a left-recursive rule (#461)
  • Fix the accessor methods generated for rules where multiple alternatives use the same label (#433)
  • Add new warning and error messages to help users (#472, #489, #500)
  • Fix lexer action execution in the middle of rules (#469)
  • Fix bug in adaptivePredict for certain left recursive rules (#509)
  • Other smaller fixes (#474, #495)

New in version 4.2 (February 5th, 2014)

  • Features:
  • XPath-like syntax for selecting parse tree nodes
  • Parse tree pattern matching using concrete syntax
  • LexerInterpreter and ParserInterpreter are much more powerful and now part of the runtime library (details)
  • Improvements:
  • Improved left-recursion elimination algorithm in the Tool (#268, #303, #313, #314, #355)
  • Substantial performance improvements for grammars containing left-recursive rules (#97, #192, #300, #400, #401)
  • antlr4-maven-plugin now prints proper error messages, and is now compatible with Eclipse m2e out-of-the-box (#319, #342)
  • A new annotation processor verifies correct use of @NotNull and @Nullable at compile time, and is available through Maven separately from the rest of ANTLR 4 in the new antlr4-annotations artifact (#434, #435) Note: This feature is only available for Maven users; not as part of the standalone ANTLR downloads.
  • Initial support for Java 8 (#337, #430)
  • The Tool supports grammar files in UTF-8 encoding with a byte order mark, a common default for text editors on Windows systems (#175)
  • Bug Fixes:
  • Many other bug fixes

New in version 4.1 (July 1st, 2013)

  • Resize after reading a file with fewer characters than bytes
  • Fix ATN created for non-greedy optional block with multiple alternatives
  • Support Unicode escape sequences with indirection in JavaUnicodeInputStream (fixes #287)
  • Remove the ParserRuleContext.altNum field (fixes #288)
  • PredictionContext no longer implements Iterable
  • PredictionContext no longer implements Comparable
  • Add the EPSILON_CLOSURE error and EPSILON_OPTIONAL warning
  • Optimized usage of closureBusy set (fixes #282)

New in version 4.0 (January 22nd, 2013)

  • Updated PredictionContext Javadocs
  • Updated Maven site documentation
  • Minor tweaks in Java.stg

New in version 3.5 (January 8th, 2013)

  • Improve error reporting and recovery for STRAY_BRACKET, fixes antlr/antlr3#42
  • Do not write output files if errors were reported, fixes antlr/antlr3#61
  • Fix AST operator on labeled set of terminals e.g. x=(A|B)^
  • Fix labeled set of terminals with rewrite e.g. x=(A|B) -> $x