4.7.1
ANTLR version 4.7.1 is a minor release but with lots of little improvements and bug fixes. You can find the pull requests grouped by target language below. Also, please find below the contributor list (auto-generated from the issues and pull request).
Summary of new features and improvements
- You can now import lexers with
mode
s into other lexer grammars [...] - The
-o
and-lib
commandline options didn't always do the obvious thing and in fact presented some problems. With clean that up but requires a new-Xexact-output-dir
command line option to enable it to avoid breaking tools built on previous versions of ANTLR [...] - For languages that support case insensitive keywords such as SQL, ANTLR does not have a built-in mechanism. Programmers either specify case insensitive lexers rules directly or they can build a special input stream that presents characters as uppercase to the lexer. I have provided documentation that describes both approaches including sample streams in various targets. [...]
- The Swift runtime was migrated to Swift 4. [...]
- You can generate SVG now from parse trees in Java target. [...]
- The NuGet package now includes the .NET Core DLL and supports both .NET 3.5 and up, as well as .NET Core. [...]
Issues fixed
- Python3 runtime says 4.6 not 4.7 (status:invalid, target:python3)
- Can not generate java files from Rust grammar file (actions, code-gen, type:bug)
- Unexpected code generation location behavior (cross-platform-issue, type:bug)
- Compiling seperate lexer and parser in subdirectory fails (comp:build, status:duplicate, type:bug)
Improvements, features
- Changed rotation to support 32 and 64-bit architectures as noted in issue #2060. (target:go, type:improvement)
- Case insensitivity doc (comp:doc, comp:runtime, lexers, type:improvement)
- Import lexers with modes into other lexer grammars (comp:tool, lexers, type:improvement)
- Add an accessLevel parser option. (actions, type:improvement)
- Support building C++ Runtime with Intel compilers (target:cpp, type:improvement)
- Improve the "gnu" message format (comp:tool, error-handling, type:improvement)
- Security related issue with System.getenv (comp:runtime, type:improvement)
- New unreachable token value warning (comp:tool, error-handling, type:improvement)
- Simplify output path generation; new -Xexact-output-dir option (actions, comp:build, comp:tool, type:improvement)
- Remove ANTLRError.nullPointer from the Swift runtime. (type:improvement)
- Migrate the Swift runtime to Swift 4. (target:swift, type:improvement)
- Report InputMismatchException with original context information (error-handling, target:java, type:improvement)
- Many fixes to antlr4-maven-plugin dependency analysis (comp:build, type:improvement)
- Implemented TokenStreamRewriter (comp:runtime, target:go, type:improvement)
- added SVG export of parse tree (target:java, trees-contexts, type:improvement)
- NuGet packaging for .NET Core (comp:build, target:csharp, type:improvement)
- CPP target runtime: fixed a memleak (target:cpp, type:improvement)
- Support importing multi-mode lexer grammars (comp:runtime, lexers, type:improvement)
Pull requests grouped by target
csharp target
- Add extra diagnostics and a retry to the C# runtime tests and upgrade the macOS runtime (comp:build, comp:testing, target:csharp)
- #2021 fixes nuget packaging options to avoid missing dll exceptions (comp:build, target:csharp)
- fix to the ATN deserialiser issue on big endian architecture (target:csharp)
- for linux target, bring up to jdk8 since jdk7 no longer available for Trusty; for linux and osx targets, bring up dotnet from 1.0.3 to 1.0.4; Trusty image now has mvn 3.3.9 builtin, removed install code (comp:build, target:csharp)
- Set version to 4.7.1 because 4.7.0 already exists on Nuget (target:csharp)
- NuGet packaging for .NET Core (comp:build, target:csharp, type:improvement)
- speed up tests; rename runtime dll ready for nuget (target:csharp)
- update to .netcore v1.0.1; add osx build (comp:build, target:csharp)
cpp target
- The correction for cmake depends on the demo (comp:build, target:cpp)
- Support building C++ Runtime with Intel compilers (target:cpp, type:improvement)
- CMake build fixes for Visual Studio (comp:build, target:cpp)
- CMake build fixes for Visual Studio (comp:build, target:cpp)
- Add MSVC support to c++ cmake build (comp:build, target:cpp)
- Remove the useless visibility attribute from this "enum class" declaration (target:cpp)
- C++ runtime: Fix two issues found by coverity (target:cpp)
- Build fixes after previous C++ patch (comp:build, target:cpp)
- Rework C++ Runtime Interval, IntervalSet, ATN and ATNState (atn-analysis, target:cpp)
- Build fix/correction for UTF32 conversion. (target:cpp)
- Small optimizations (target:cpp)
- C++ runtime changes for high warning levels (target:cpp)
- Fix listener example in C++ documentation. (comp:doc, target:cpp)
- Make ParseTreeWalker::DEFAULT provide an IterativeParseTreeWalker (target:cpp, trees-contexts)
- Fix the utf8 convertor for VS2017 (target:cpp, unicode)
- Update C++ target doc for latest API changes - fixes #1824. (comp:doc, target:cpp)
- Channel parameter in c-tor is now a size_t - fixes #1827. (target:cpp)
- Small fix in cmake file. Fixes #1809. (comp:build, target:cpp)
- CPP target runtime: fixed a memleak (target:cpp, type:improvement)
go target
- Export GetHiddenTokens routines (target:go)
- Fix issue with tree finding when the underlying slice needs to be resized. (target:go)
- Changed rotation to support 32 and 64-bit architectures as noted in issue #2060. (target:go, type:improvement)
- Add RuleContext interface methods to reserved words (target:go)
- Revert "[Go] Interval" (target:go)
- Placed the CommonSetStuff code inside a scope (code-gen, target:go)
- Export Go lexer methods (target:go)
- Allowing Go runtime compilation to succeed under ARM (target:go)
- Add CommonTokenStream test. (target:go)
- Interval (target:go)
- Implemented TokenStreamRewriter (comp:runtime, target:go, type:improvement)
- Add getter method to Interval. (target:go)
- Go file header complies with standardised Go 'generated code' header (code-gen, target:go)
- Fix #1925 (target:go, target:javascript, target:python2, target:python3, unicode)
- Add proper error handling semantics to FileStream. (target:go)
java target
- Fixes #2069 to catch env var security exception (target:java, type:bug)
- Fix codegen error (Java) when a lexer has only fragment tokens (code-gen, target:java)
- Fixed empty CodePointCharStream throwing exception on getText. (target:java, unicode)
- Report InputMismatchException with original context information (error-handling, target:java, type:improvement)
- Avoid adding to closureBusy before all ATNConfig properties are set (atn-analysis, comp:performance, target:java, type:bug)
- added SVG export of parse tree (target:java, trees-contexts, type:improvement)
javascript target
- enable auto-suggest engines by exposing the lexer ATN as a property, similar to the parser ATN (target:javascript)
- Fix Interval usage in ErrorStrategy.js (target:javascript)
- Require superClass for Lexer in split mode for JavaScript target (target:javascript)
- fix inconsistent naming in target stg (target:javascript)
- Fix #1925 (target:go, target:javascript, target:python2, target:python3, unicode)
- Add
new
keyword to return proper InputStreams (target:javascript, type:bug)
python2,3 targets
- fix #2031 (target:python2)
- Python: add public getter to parsers to access syntax error count. (target:python2, target:python3)
- Fix #1925 (target:go, target:javascript, target:python2, target:python3, unicode)
- Fix input mismatch errors not reported the same way as Java in Python (comp:testing, error-handling, target:python2, target:python3)
- Use spaces consistently to indent the generated Python code. (target:python2, target:python3)
- Import RuleContext into the antlr4 module namespace. See Issue #2012. (target:python3)
- Python 3 codegen probably didn't mean to limit ATN segment size to 2 XOR 31 (target:python3, type:bug)
swift target
- Fix parse-cancellation in BailErrorStrategy. (target:swift)
- Remove Recognizer.tokenTypeMapCache and .ruleIndexMapCache. (target:swift)
- Fix initialization of {Lexer,Parser}Interpreter.decisionToDFA. (target:swift)
- Remove Triple.swift. (target:swift)
- Make ATNSimulator.sharedContextCache non-optional. (target:swift)
- Remove unused ATN.modeNameToStartState. (target:swift)
- Some minor tidyups. (target:swift)
- Make DFA.precedenceDfa be a "let" rather than a "var". (target:swift)
- Replace IntervalSet.setReadonly with makeReadonly. (target:swift)
- Make all the mutexes "let" rather than "var". (target:swift)
- Tidy-ups inside the Swift runtime around ParseTree, ParserRuleContext (target:swift)
- Remove use of deprecated String functions (target:swift)
- Open the error strategies to subclasses. (target:swift)
- Tidy ATNDeserializer. (target:swift)
- Report errors in ANTLRFileStream. (target:swift)
- Implement UUID.init(mostSigBits, leastSigBits) in the Swift runtime. (target:swift)
- Fix ParseTreePatternMatcher.split in the Swift runtime. (target:swift)
- Make CharStream.init(CharStream) required (in the Swift runtime). (target:swift)
- Fix UnbufferedCharStream in the Swift runtime. (target:swift)
- Fix retain cycles in the Swift runtime (target:swift)
- Implement UnbufferedCharStream in the Swift runtime. (target:swift)
- Tidy up the exception behavior around IntervalSet and ATNConfigSet. (target:swift)
- Tidy up the exception handling around RecognitionException. (target:swift)
- Tidyups inside the Swift runtime (target:swift)
- Update boot.py and swift-target.md to reflect Swift 4 migration changes. (target:swift)
- Improve MurmurHash (target:swift)
- Migrate the Swift runtime to Swift 4. (target:swift, type:improvement)
- Updated swift-target.md. (comp:doc, target:swift)
- Swift Documentations (comp:doc, target:swift)
- Swift Target Linux Support (target:swift)
- Supporting Script for Swift Runtime (target:swift)
- Fixing Problems after Swift3.1 Release (target:swift)
- Fixing Xcode project setting. (comp:build, target:swift)
- Obsolete String.contains(_:) of Swift runtime (target:swift)
Contributors
- 42 items: Ewan Mellor (ewanmellor)
- 8 items: Terence Parr (parrt)
- 8 items: Mike Lischke (mike-lischke)
- 7 items: hanjoes (hanjoes)
- 5 items: ericvergnaud
- 4 items: David Sisson (davesisson)
- 4 items: Maxim (gendalph)
- 4 items: Sam Harwell (sharwell)
- 3 items: Corey Kosak (kosak)
- 3 items: Dong Xie (xied75)
- 2 items: JavaDDD
- 2 items: Ivan Kochurkin (KvanTTT)
- 2 items: Andrew Brampton (bramp)
- 2 items: Sachin Jain (sachinjain024)
- 2 items: shirou (shirou)
- 2 items: Arshinskiy Mike (neatnerd)
- 2 items: Matt Hauck (matthauck)
- 2 items: Renáta Hodován (renatahodovan)
- 2 items: jm-mikkelsen
- 2 items: lys0716
- 1 items: Oran Epelbaum (oranoran)
- 1 items: Nicolas Croad (niccroad)
- 1 items: zqlu (zqlu)
- 1 items: Ajay Panyala (ajaypanyala)
- 1 items: Jason Mooberry (jasonmoo)
- 1 items: simkimsia
- 1 items: Rostislav Listerenko (kaedvann)
- 1 items: fallnirvana (moon-fall)
- 1 items: Robert Jacobson (rljacobson)
- 1 items: Bráulio Bezerra (brauliobz)
- 1 items: Masashi Fujita (objectx)
- 1 items: Sandy Corn (onekosha)
- 1 items: Eddy Reyes (ereyes01)
- 1 items: Milan Aleksić (milanaleksic)
- 1 items: Tiago Mazzutti (tiagomazzutti)
- 1 items: Niels Basjes (nielsbasjes)
- 1 items: Venkat Peri (venkatperi)
- 1 items: Vaibhav Vaingankar (vaibhavaingankar09)
- 1 items: Maurice van der Pot (Griffon26)
- 1 items: Dan Halperin (dhalperi)
- 1 items: Sergey Parshukov (jBugman)
- 1 items: alim (alimg)
- 1 items: rlfnb
- 1 items: Daniel Katz (danielkatz)
- 1 items: Erik A. Brandstadmoen (erikbra)
- 1 items: Will Fuqua (waf)
- 1 items: Jim Allman (jimallman)
- 1 items: Shravan Narayan (shravanrn)
- 1 items: Brad Hards (bradh)
- 1 items: Floor (FloorGoddijn)
- 1 items: Ben Hamilton (Ben Gertzfield) (bhamiltoncx)
- 1 items: Jonas Auer (cmd-johnson)
- 1 items: Gerald Rosenberg (grosenberg)
- 1 items: Arthur Fabre (arthurfabre)