Changelog History
-
v4.9 Changes
November 24, 2020π New DART target
Thanks to @lingyv-li, we have a DART target!
π Issues fixed
- β [Python3] Large import time cost paid for inline unittests ()
- β Dart tests fail (target:dart)
- C++20 can not construct a std::string with a UTF-8 encoded string literal ()
- β Warning in generated javascript code when using node 14 ()
- π Python3 parser generation incorrect by ANTLR 4.7.1 and problem in Parser.py (target:python3)
- PHP target generates invalid output when $ is used as part of the literal in lexer rule (target:php)
- π¦ [C++][CMake] find_package() fails when the C++ runtime is make-install'ed ()
- π [Go] Generated lexer and parser file names are always in lower case with underscore ()
- Syntax error in antlr4/runtime/Swift/boot.py (target:swift)
π Improvements, features
- Avoid stepping through ANTLR generated code when debugging (C#) (target:csharp, type:improvement)
- replace gramamr with grammar (type:improvement)
- Dart Target (target:dart, type:improvement)
Pull requests grouped by target
csharp target
- Made C# Trace Listener usable for most cases (target:csharp)
- Avoid stepping through ANTLR generated code when debugging (C#) (target:csharp, type:improvement)
- π¨ refactored AntlrInputStream.cs by removing a redundand if-statement (target:csharp)
- π Clarify and expand documentation for runtime ParseTreeWalker (target:csharp)
- NullReferenceException in CSharp target #2304 (target:csharp)
cpp target
- cpp-target.md link broken fix (comp:doc, target:cpp)
- π Fix linker issue when compiling Cpp runtime with CMake and MSVC on Windows (comp:build, target:cpp)
- β Fix regressions in travis Cpp tests (target:cpp)
- Fix clang compile error with --stdlib=libc++ (target:cpp)
- π [C++ runtime] Remove codecvt header (deprecated in C++17) in cpp runtime. (target:cpp)
- Fix C++ target README example (comp:doc, target:cpp)
- 0οΈβ£ [C++ codegen] Add default cases to AltBlock and OptionalBlock (target:cpp)
- π [C++ codegen] Remove use of the u8"" string literal prefix (target:cpp)
- [C++ codegen] Add explicit keyword to constructor (target:cpp)
- [C++ runtime] Fix static const ODR violations (target:cpp)
- [C++ runtime] Add AntlrInputStream(std::string_view) constructor (target:cpp)
- [C++ runtime] Improvements of Vocabulary::fromTokenNames (target:cpp)
- π [C++ runtime]: Improve coding style of auto usages (target:cpp)
- C++ target: don't generate extra/duplicate semicolons (target:cpp)
- C++ target: escape ? character to prevent accidental trigraphs (target:cpp)
- π Fixed link to CMake example in cpp-target.md (comp:doc, target:cpp)
- β‘οΈ Update cpp-target.md doc (tree::ParseTreeWalker::DEFAULT is now a reference) (actions, target:cpp)
- Fix CMake packaging (target:cpp)
- Fix #2727: improve setTokenFactory in Cpp target (target:cpp)
go target
- [Go] Thread-safe ANTLR codegen (target:go)
- [Golang] enable syntax highlighting (comp:doc, target:go)
java target
javascript target
- π Corrected Webpack configuration in JavaScript documentation (comp:doc, target:javascript)
- Javascript es6 migration (target:javascript)
- Fix template issue (target:javascript)
- Fix #2902 (target:javascript)
- Fix a NPE (target:javascript, type:bug)
- fix for issues in #1759 (target:javascript)
- Javascript: migrate prototypical root modules to ES6 (target:javascript)
- Javascript: fix some cyclic dependencies (target:javascript)
- Javascript: migrate prototypical ATN objects to ES6 (target:javascript)
- π» Javascript: browser support increased with babel transformation (target:javascript)
- β Drop browser tests (target:javascript)
- Javascript: migrate prototypical Tree objects to es6 classes (target:javascript)
- Javascript: migrate prototypical DFA objects to es6 classes (target:javascript)
python2 target
- Fix code generation for catch statements in python (target:python2, target:python3)
python3 target
- π Changed Python runtime Lexer.py, Parser.py to support version >= 3.5 (target:python3)
- Fix undefined value (target:python3)
- π changed python3 runtime Lexer.py, Parser.py to support version > 5. (target:python3)
- β separate py3 runtime tests from src tree + actually run said tests in CI (target:python3)
- Fix code generation for catch statements in python (target:python2, target:python3)
swift target
- π Added missing swift version of class ParseTreeProperty (target:swift)
- β‘οΈ [Swift] Update codegen template (target:swift)
- added throws declaration missing from generated swift code (target:swift)
php target
- [PHP] Escape dollar sign in target string literal (target:php)
- π fix composer command in documentation (comp:doc, target:php)
dart target
- π Fix travis ci for Dart pin version (target:dart)
- π Pin dart version to 2.8.4 to get unit tests passing (comp:build, target:dart)
- Dart Target (target:dart, type:improvement)
Contributors
- 7 items: Camilo Roca (carocad)
- 6 items: ericvergnaud
- 5 items: Nathan Burles (nburles)
- 3 items: cliid (cliid)
- 3 items: Felix N (felixn)
- 3 items: Larry Li (lingyv-li)
- 3 items: sullis
- 2 items: Adam WΓ³js (adamwojs)
- 2 items: Rob McGregor (rmcgregor1990)
- 1 items: Michel Hartmann (MichelHartmann)
- 1 items: Adarsh Bhat (adarshbhat)
- 1 items: Martin Mirchev (Marti2203)
- 1 items: Rex Jaeschke (RexJaeschke)
- 1 items: Muhammed Zakir (MuhammedZakir)
- 1 items: trenki2
- 1 items: Arunav Sanyal (Khalian)
- 1 items: Tian Siyuan (tiansiyuan)
- 1 items: Arthur Sonzogni (ArthurSonzogni)
- 1 items: demons (Clcanny)
- 1 items: ericliu (eric-buaa-cn)
- 1 items: Steven Johnstone (stevenjohnstone)
- 1 items: Terence Parr (parrt)
- 1 items: Shan M (sha-N)
- 1 items: Akos Kiss (akosthekiss)
- 1 items: Gareth Andrew Lloyd (Ignition)
- 1 items: Crasse maximum (IohannRabeson)
- 1 items: Pablo Blanco CeldrΓ‘n (sigmasoldi3r)
- 1 items: Kilian Kilger (cohomology)
- 1 items: Franco Victorio (fvictorio)
- 1 items: David MARKEY (d-markey)
- 1 items: [OXID-PS] Keywan Ghadami (keywan-ghadami-oxid)
- 1 items: gomerser
- 1 items: Moses Paul R (iammosespaulr)
- 1 items: Tristan Swadell (TristonianJones)
- 1 items: Martin van Wingerden (martinvw)
- 1 items: Adam Grabski (Agrabski)
- 1 items: Leon Wehmeier (lwehmeier)
- 1 items: Denis Kyashif (deniskyashif)
- 1 items: Song Yang (XsongyangX)
- 1 items: Mark Lilback (mlilback)
- 1 items: StochasticTinkr
- 1 items: Nathanael Demacon (quantumsheep)
- 1 items: gerrie-myburgh
- 1 items: JuliΓ‘n BermΓΊdez Ortega (julibert)
- 1 items: Steve Vinoski (vinoski)
- 1 items: praveen4463
- 1 items: Ben List (listba)
- 1 items: Markus Franke (markus-franke)
- 1 items: Eason Lin (easonlin404)
- 1 items: thron7
- 1 items: delins
- 1 items: Abhijith Neil Abraham (abhijithneilabraham)
- 1 items: Massimo Santini (mapio)
- 1 items: t-gergely
- 1 items: wkhemir
- 1 items: Ivan Kochurkin (KvanTTT)
- 1 items: xsIceman
- 1 items: Alexander Selling (sellingsolutions)
-
v4.8 Changes
January 20, 2020π Thanks to @marcospassos, ANTLR 4.8 introduces a PHP target! See PHP PRs
π Issues fixed
- C# Antlr4.Runtime.Standard v4.7.2.0 assembly signature problem (comp:tool, status:duplicate, target:csharp)
π Improvements, features
cpp target
- π C++ VS project updates for next ANTLR4 release (comp:build, comp:doc, target:cpp)
- don't unnecessary fetch all tokens when grabbing an interval of text β¦ (target:cpp)
- fix cpp cmake for emscripten (target:cpp)
go target
- π Remove unnecessary Travis files. (target:go)
javascript target
- Fix placement of @members in Javascript target lexers (target:javascript)
- π¦ Fix main entry point for JavaScript runtime npm package (target:javascript)
swift target
- [Swift] Migrate Swift runtime to Swift 5. (target:swift)
- β [Swift] Check process exit status during tests. (target:swift)
Contributors
- 5 items: Ewan Mellor (ewanmellor)
- 1 items: Mike Lischke (mike-lischke)
- 1 items: Marcos Passos (marcospassos)
- 1 items: jimmy-the-eek
- 1 items: Tabari Alexander (tehbone)
- 1 items: Zhiqiang Lu (zqlu)
- 1 items: WalterCouto
- 1 items: Markus Zancolo (kuegi)
-
v4.8-1
January 18, 2020 -
v4.7.2 Changes
December 18, 2018π Issues fixed
- Antlrv4 failed installation (actions)
- [cpp] Setting
contextSuperClass='antlr4::RuleContextWithAltNum'
doesn't work (target:cpp) - π Please publish JDK 9 Automatic-Module-Name entries (comp:build)
π Improvements, features
- π Assign token names to string literals in parse rule contexts (code-gen, type:improvement)
- π File path handling fixes (comp:tool, type:improvement)
- π Fixed warning from MingGW and error from Clang Windows (target:cpp, type:improvement)
- π Fix null pointers + remove unused lines (type:improvement)
Pull requests grouped by target
csharp target
- π fix NPE (comp:build, target:csharp)
- Fix #1955 python (target:csharp, target:python2, target:python3)
- β‘οΈ Updated csharp-target doc (comp:doc, target:csharp)
- π¦ Make C# NuGet package name more visible in runtime docs (comp:doc, target:csharp)
cpp target
- π virtual dtor for ParseTreeProperty (target:cpp)
- Do not throw std::bad_cast from antlrcpp::Any::is (target:cpp)
- Add const accessors to antlrcpp::Any C++ class (target:cpp)
- Fix for antlr#2164. (target:cpp)
- Applied C++ changes for PR #1955. (target:cpp)
- Fix #2350 (target:cpp)
- π Add support c++ target on android (comp:build, target:cpp)
- π Changes to cpp runtime to make antlr work with Chromium build (target:cpp)
- π Fixed warning from MingGW and error from Clang Windows (target:cpp, type:improvement)
- Fix #1855, #2211 (comp:runtime, target:cpp)
- π¦ Support for CMake Packages in the Cpp Runtime (target:cpp)
- Force usage of 'previousContext'. (target:cpp)
- π» Don't create exception objects if you don't throw them. (target:cpp)
- π Patch for multi-threaded parsing with the C++ runtime (target:cpp)
- π Add missing -std=c++11 flag when using non-appleclang compiler on macosx (comp:build, target:cpp)
- π Add Visual Studio 2017 project to Cpp runtime. Also change define for static library setting to be ANTLR4CPP_STATIC, in all projects. (comp:build, target:cpp)
- π C++ runtime: Make Parser::exitRule() non-virtual (comp:performance, target:cpp)
go target
java target
- Avoid StringIndexOutOfBoundException (target:java, type:bug, unicode)
- Java.stg: use static functions instead of inline arrays (code-gen, target:java)
javascript target
- Fix #1955 javascript (target:javascript)
- fix indentation in javascript target examples (comp:doc, target:javascript)
- π JavaScript parse tree visitor: check if ctx.children is non-null in visitChildren (target:javascript, type:bug)
- π Remove unused
_loadString
parameter (target:javascript)
python2 target
- Fix #1955 python (target:csharp, target:python2, target:python3)
- π fixes #2188 (target:python2, target:python3)
python3 target
- Fix #1955 python (target:csharp, target:python2, target:python3)
- Fix install dependency for 'typing' library in python3.4 (target:python3)
- β‘οΈ Update to python 3.6 (comp:build, target:python3)
- π¦ Allow importing StdinStream from antlr4 package (target:python3)
- Add StdninStream for python3 runtime. Closes: #2271 (target:python3)
- π Fixes #2301 (target:python3)
- π Enable ParserATNSimulator debug mode in Python3 target (target:python3, type:bug)
- π fixes #2188 (target:python2, target:python3)
- [Python3] return result instead of None in visitor (target:python3)
swift target
- [Swift-runtime] Make sure mutexes are being freed accordingly (target:swift)
- [Swift] Syntax error in antlr4/runtime/Swift/boot.py (target:swift)
- π [Swift] Make ParserATNSimulator.precedenceTransition return a nullable value. (target:swift)
- π Move the Swift runtime to Swift 4.2 (target:swift)
- π Testability and build improvements (comp:build, comp:testing, target:swift)
- π Enable some performance tests on Swift. (comp:testing, target:swift)
- [Swift] Report InputMismatchException with original context information (target:swift)
- [Swift] Minor tidyups in the stream code. (target:swift)
- [Swift] Make ATNDeserializationOptions a simple struct. (target:swift)
- π [Swift] Remove HashMap and fix Parser caches. (target:swift)
Contributors
- 11 items: Ewan Mellor (ewanmellor)
- 7 items: ericvergnaud
- 4 items: Mike Lischke (mike-lischke)
- 2 items: Prateek Gulati (prateekgulati)
- 2 items: Adriaan Duz (nxtstep)
- 2 items: Steve Vinoski (vinoski)
- 2 items: Vladimir Goncharov (AmatanHead)
- 2 items: Maxim Novikov (m-novikov)
- 2 items: Mark Raynsford (io7m)
- 1 items: hannemann-tamas
- 1 items: Prashast Srivastava (prashast)
- 1 items: Alex Mykyta (amykyta3)
- 1 items: Sergey Chupov (scadgek)
- 1 items: Terence Parr (parrt)
- 1 items: Ivan Kochurkin (KvanTTT)
- 1 items: Lucas Henrique (LucasHMS)
- 1 items: ε΄ζ Wu Sheng (wu-sheng)
- 1 items: Ale Contenti (alecont)
- 1 items: Dan Halperin (dhalperi)
- 1 items: Stephen Vance (srvance)
- 1 items: sinopsysHK
- 1 items: johnvanderholt
- 1 items: Joe R. Smith (solussd)
- 1 items: uvguy
- 1 items: Daniel Clifford (dannoc)
- 1 items: Chase (ChaseOxide)
- 1 items: JΔdrzej Biedrzycki (TAndronicus)
- 1 items: Raz Friman (razfriman)
- 1 items: Zongyuan Zuo (EternalPhane)
- 1 items: SΓΆnke Schau (xgcssch)
- 1 items: Kaspar Emanuel (kasbah)
- 1 items: Robert (robertbrignull)
- 1 items: Corey Kosak (kosak)
- 1 items: jkmar
- 1 items: Kyle Sletten (kbsletten)
- 1 items: Ajay Panyala (ajaypanyala)
- 1 items: Nicolas Croad (niccroad)
- 1 items: janlinde
- 1 items: Enes SOYLU (enessoylu)
-
v4.7.1 Changes
December 09, 2017π 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)
- 0οΈβ£ 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)
- You can now import lexers with
-
v4.7 Changes
March 30, 2017π ANTLR version 4.7 is a major release with many improvements and bug fixes.
π Summary of new features, improvements, fixes
π The primary improvement is that ANTLR and all code generation targets can now handle full 21-bit unicode thanks to the superhuman effort of Ben Hamilton, @bhamiltoncx. After much thought concerning the "create stream" interface, I have decided on the following end result: C++, Python, Go, and Swift APIs didn't need any changes to support full Unicode code points, so I decided to leave those alone. Java, C#, and JavaScript runtimes required changes. Rather than gutting and changing the interface of the previous ANTLRFileStream etc..., I have deprecated those and introduced a CharStreams.fromXXX factory style interface for creating streams. For example,
CharStreams.fromFileName("foo.txt"))
. See the new unicode documentation and a complete list of all pull requests related to Unicode.β¬οΈ
UnbufferedCharStream
for Java and C# targets was upgraded to use UTF-8 rather than the locale default encoding; they further support U+10FFFF Unicode code points. C++ is the only other target with the unbuffered stream and it worked as-is.- Change UnbufferedCharStream to use code points
- Use UTF-8 by default in UnbufferedCharStream and allow specifying charset
- C#: Change UnbufferedCharStream to use 32-bit Unicode code points and 32-bit buffer
π In addition to creating
CharStreams
capable of supporting 21-bit Unicode, we added notation for Unicode code points beyond 16 bits (4 hexadecimal digits). The usual notation\uABCD
still works for the basic code points but you can now use\u{1FFFF}..\u{10FFFF}
to access the full range:- Support UTF-32 escape sequences
You can also include all characters matching Unicode properties such as
[\p{Emoji}]
:- Add new \p{Extended_Pictographic} and related Unicode property escapes
- Also support Unicode enumerated properties via \p{Foo=Bar} syntax
- Update docs for new Unicode literal and property escapes
- New class EscapeSequenceParsing with \p{UnicodeProperty} support
- New \p{Letter} Unicode property escape
- A few last escapes: \p{EmojiPresentation=EmojiDefault} and \p{EmojiPresentation=TextDefault}
- UnicodeData: Also support Unicode blocks
π The C# target now supports .NET Core Support, thanks to David Neumann @lecode-official and Dong Xie @xied75!
We did quite a bit of cleaning up in the lexer escape char and char set areas (big thanks to Ivan Kochurkin @KvanTTT):
- Escapes sequence recognition failure in character sets
- Throw "invalid escape sequence" for double quote in string literals: '\"'
- Fixed incorrect "used multiple times" warning.
- error-> warnings. Fixes #1537
- Reverted unterminated ranges: [+-], [-+], [-].
- More accurate error messages
- Added invalid charset error (for ranges without start or end) (comp:tool, error-handling)
The Go runtime was significantly speeded up.
- Initialize decisionToDFA in init in Go.stg
π The XPath tree matching library used an ANTLR grammar itself, which caused a cyclic dependency in the build whereby ANTLR version v was required to build version v. I implemented a handbuilt lexer to get rid of this dependency on a grammar: XPathLexer not updated in release process, Fixes #1620. Make handbuilt lexer to avoid cyclic dependence of tool and plugin.
π The Java, Swift, and C++ targets have added a hook to the construction of parse tree leaf nodes: factor out the creation of error nodes and terminal nodes in the parser. Code
new TerminalNodeImpl(..)
andnew ErrorNodeImpl(...)
instead now calls a few factory methods in the Parser that you can override in your application.π Issues fixed
C++ target:
- SIGABRT when using TokenStreamRewrite::Delete method
- Cpp runtime: compile needed header
- β compilation warning
- Segmentation fault on TokenStreamRewriter destructor call
- π Runtime build failure on gcc 6.3.1
- π Fixed regression introduced by wrong optimization. Fixes #1708. (target:cpp)
- π Fixed crash with multi threaded parsers warming up at the same time. (target:cpp)
- Improve error message in exceptions (target:cpp)
- Using new Unicode syntax for C++ demo project. (target:cpp, unicode)
- Fix syntaxError prototype issue (target:cpp)
- π Fixed a number of data type + signedness issues in the C++ target (target:cpp)
- Some compilers need the functional include. (target:cpp)
- Fix wrong include path of antlr4cpp runtime in cmake/ExternalAntlr4Cpp.cmake (target:cpp)
- π Fix parse tree property (target:cpp)
- π No static libs anymore for Windows C++ runtime. (comp:build, target:cpp)
- Lr loop fix (target:cpp, type:improvement)
- π adapt code to compile with msys2 mingw compiler (comp:build, target:cpp, type:improvement)
- π Fix for VS 2013 runtime builds (C++) (comp:doc, target:cpp)
- Implemented enhanced CommonToken::toString method
- Using new Unicode syntax for C++ demo project. (target:cpp, unicode)
- π· fix an issue where loading antlr from an IE web worker would fail (target:javascript)
- Issue 1483 (target:cpp, type:improvement)
JavaScript target:
- JavaScript target: super class of TraceListener is not correctly set
- BailErrorStrategy in JavaScript
- JavaScript visitors not visiting children
- π Javascript Target documentation contains no reference to existing NPM package?
- π¦ Doc antlr4 / doc / javascript-target.md outdated, states there is no NPM package for antlr4 runtime
- tweak wildcard
- π Fixed null pointer exception for JS target
- Fix missing variable declarations
- π· fix an issue where loading antlr from an IE web worker would fail
- fix typo in javascript visitor
- β‘οΈ Update npm related docs
- missing js export
Python2/3:
- π python2: Bug in IntervalSet.py:removeOne causes exception when taking complement
- Python 2 - missing IllegalStateException import in PredictionContext.py
- fix 'CommonToken' object has no attribute 'stopIndex' in Python{2|3}
- Fix a Python 2 typo
- π Python 2 - missing - ErrorNode and TerminalNode - imports in Parser.py
- Python 2 - missing IllegalStateException import in PredictionContext.py
C#:
- π Fixed portability problems in C# target. Also cleaned up some XML doβ¦
- Fix C# Pair.cs, Right arrow escaping in XML Comments
- Fix #1298 for CSharp
- π Remove unused C# runtime method Utils.ToCharArray
- Look in /usr/local/bin before /usr/bin for mono
Go:
- π go target: copyright notices are interpreted as package documentation
- Added "action" to badWords set for Go runtime.
- π Remove lower case formatting on Go types & super import
- Use single-line comments for copyright
- Format Go runtime files
Java:
Swift:
- π Remove generated files from repository and add testRig for Swift target (target:swift)
- π¦ Tweak Repo to use SwiftPackageManager. (target:swift)
Tool or all-target-runtime related:
- βοΈ Wildcards were not handled properly, they were treated as sets! fix some typos Sam noticed.
- crash upon bad grammar
- Antlr 4.6 does not like same named rule element labels for different alternative labels
- More accurate error messages
- Added invalid charset error (for ranges without start or end)
- New tool utility class Unicode
- The final fix (hopefully) for alternative labels check in left recursive rules
- π Implement support for optional getters
- Disable label checks for left recursive rules
- New doc 'Contributing to ANTLR'
- Channel names & constants in lexer, improved modes record format.
-
v4.6 Changes
December 15, 2016π ANTLR version 4.6 is a major release with many features and bug fixes.
π Summary of new features, improvements, fixes
- π NEW TARGETS : C++, Swift, Go:
- Peter Boyer (Go target)
- Mike Lischke (C++ completed target)
- Dan McLaughlin (C++ initial target)
- David Sisson (C++ initial target and test)
- Janyou (Swift target)
- Ewan Mellor, Hanzhou Shi (Swift target merging)
- π Major performance improvement discovered by @sharwell. We were seeing a number of reports of nonterminating parses for very large expressions with grammars that used left recursive rule specifications (like
e : e '*' e | INT ;
). Sam noticed that the parsing engine detected an ambiguity between two choices and resolved it properly but that both would lead to a valid parse. It turns out that the first choice is what led to really slow parsing but the second choice is much faster and still yields a valid parse. Most targets have added that improvement. Here is the discussion of the issue and solution and the primary patch for java. - Error handling improved in cases related to LL(1) decisions for optional and closure subrules. Matching sets of tokens were also sometimes considered resynchronization (error) tokens. Single token deletions that occurred at the start of expressions were sometimes not included in the parse tree as error nodes.
- Add
sync()
calls back in for LL(1) decisions. (code-gen, error-handling) - Matched tokens being marked as error (comp:runtime, error-handling, trees-contexts, type:bug)
- Single-token deletion error node not in parse tree (error-handling, trees-contexts, type:bug)
- Add
- π The tool itself generates better error messages :
- Crash with NullPointerException in SymbolChecks.checkForModeConflicts with empty lexer (comp:tool, grammars, type:bug)
- Have ANTLR4 prevent conflict with user rule names by behind-the-scenes renaming of its own variables (status:cannot-reproduce)
- Add compile-time errors/warnings for use of incompatible lexer commands (comp:tool, error-handling)
- character set issues (comp:tool, error-handling, type:improvement)
- Duplicated and incompatible commands (comp:tool, error-handling, type:improvement)
- π· We fixed a number of issues with the build system
- Tidy poms (comp:build, type:improvement)
- divide and conquer Travis CI (comp:build, type:improvement)
- Version information omitted from MANIFEST.MF in antlr-4.5.1-complete.jar (comp:build, type:bug)
- antrl4--sources.jar does not contain sources for runtime (comp:build, type:bug)
- OSGi module name does not reflect Maven module name (comp:build, type:improvement)
- Running a limited subset of runtime-testsuite (comp:testing, type:improvement)
- Improvements to the ANTLR4 mvn plug-in :
- Grammar dependency management for Maven plugin (comp:build, comp:maven-plugin, type:improvement)
- antlr4-maven-plugin: code generated in wrong encoding (comp:maven-plugin, type:improvement)
- β
The ANTLR unit test mechanism was completely rewritten but it should not affect anyone other than the development team
- Refactor runtime test generation mechanism (comp:testing, type:improvement)
- We assume java 1.7 not 1.6 now.
- Drop support for 1.6, move pom.xml etc. to JDK 1.7 (cross-platform-issue, type:improvement)
- Miscellaneous
- make sure BSD 3-clause license prefix is consistent and on all appropriate files (type:improvement)
- Allow paths as tokenVocab option (comp:build, comp:tool, type:improvement)
- add TokenStreamRewriter to Python2 runtime (target:python2, type:improvement)
- Add an iterative version of the ParseTreeWalker (comp:runtime, target:java, trees-contexts, type:improvement)
- indicate token types as well as numbers in -tokens dump (target:java, type:improvement)
- Binary parsing (comp:doc, type:improvement, type:question)
π Issues fixed
- Python 2 Target's ErrorStrategy Creates Problematic Tokens (target:python2, type:bug)
- Prefix rules that also recurse are not detected (grammars, type:bug)
- π mvn compile failing. Could not resolve dependencies (comp:build, comp:doc, type:bug)
- Repeated epsilon transitions in ATN from left-recursive grammar (atn-analysis, type:bug)
- π Add
sync()
calls back in for LL(1) decisions. (code-gen, error-handling) - Array2DHashSet.clear does not reset threshold (target:java, type:bug)
- ANTLR 4.5.3 & java.lang.StackOverflowError (comp:tool, type:bug)
- Matched tokens being marked as error (comp:runtime, error-handling, trees-contexts, type:bug)
- π Single-token deletion error node not in parse tree (error-handling, trees-contexts, type:bug)
- $e.v yields incorrect value 0 in "e returns [int v] : '1' {$v = 1;} | '(' e ')' {$v = $e.v;} ;" (actions, grammars, type:bug)
- Strange code in JavaScript - PredictionContext.js line 191 (target:javascript, type:bug)
- A bug of the antlr4 python3 runtime 4.5.3 (target:python3, type:bug)
- π Empty alternative in rule causes syntax error in *Parser.py for Python2/3 targets (target:python2, target:python3, type:bug)
- getText method with arguments not always works correctly (target:java, type:bug)
- π maven plugin dependency tracking ignores imported files (comp:build, comp:maven-plugin, comp:tool)
- NullPointerException on invalid attribute reference (comp:tool, type:bug)
- π getLookaheadParseTrees() should reset or create new error handler each alt but doesn't (comp:runtime, trees-contexts, type:bug)
- π getAllPossibleParseTrees() doesn't work when ambig input reaches eof. (comp:runtime, trees-contexts, type:bug)
- π Changing '+' to '*' crashes antlr4 (atn-analysis, parsers, type:bug)
- Crash with NullPointerException in SymbolChecks.checkForModeConflicts with empty lexer (comp:tool, grammars, type:bug)
- LB() can try to scan to i < 0 (comp:runtime, type:bug)
- Incorrect childs generation with array of element label (grammars, status:invalid)
- TokenStreamRewriter for Python (target:python2)
- β getTokenTypeMap should test all token type values (comp:runtime, target:java, type:bug)
- π Version information omitted from MANIFEST.MF in antlr-4.5.1-complete.jar (comp:build, type:bug)
- π antrl4--sources.jar does not contain sources for runtime (comp:build, type:bug)
- π template error: attribute parser isn't defined (target:javascript, type:bug)
- β Add compile-time errors/warnings for use of incompatible lexer commands (comp:tool, error-handling)
- π NEW TARGETS : C++, Swift, Go:
-
v4.6-rc1
December 14, 2016 -
v4.5.3 Changes
March 31, 2016π Features / improvements
- π New grammar option:
contextSuperClass
. All parse tree internal nodes will derive from this. Default isParserRuleContext
. Should derive from ultimatelyRuleContext
at minimum.
Java target can usecontextSuperClass=org.antlr.v4.runtime.RuleContextWithAltNum
for convenience. It adds a backing field foraltNumber
, the alt matched for the associated rule node. - Added
getMaxTokenType()
toVocabulary
interface
Complete list of pull requests for 4.5.3 but most of those are fixing bugs.
Issues
Complete list of issues closed/solved for 4.5.2.
- π New grammar option:
-
v1.8.4-version
April 06, 2017