Releases: mike-lischke/antlr4ng
New major release
This release completes the conversion of the Java (and JavaScript) ANTRL4 runtime to TypeScript. It's a significant improvement over the existing TS (and JS) runtimes, as it includes now all relevant parts from the Java runtime and has been optimized for performance. It's now twice as fast for cold runs and 20% faster with a warm parser/lexer.
New major release CLI
This is the next major release of the code generator, after an overhaul of the antlr4ng runtime. It introduces a number of API changes, but no changes to the original working mechanism. The other targets (C++, Java, etc.) are not affected by this release. All changes in this release are to support the new antlr4ng major release 3.0.0:
- Renamed class members (_type -> type, _channel -> channel, _mode -> mode, _parseListeners -> parseListeners).
- Specialized getText methods for the token stream, to avoid frequent parameter checking in method overloading.
- Merged the class RuleContext into ParserRuleContext. It's not used anywhere else, so why keeping it around?
- ParserRuleContext.exception has been removed and it is no longer set in generated code (only relevant for error conditions, where a proper exception is passed to error listeners.
- More non-null assertions and null-safety checks have been added (mostly relevant for local rule variables and return values).
v2.0.11
- Fixed bug #30 ReferenceError: Super constructor may only be called once
- The entire runtime test library from the Java runtime has now been ported to TypeScript and is used from now on to check the correctness of this runtime.
- The bit set class used bigint to store the values, which is a problem with bundlers like webpack that have no support for bigint. For this reason that type has been replaced (PR #40 feat: replace bigint and BigUint64Array).
- The bundle is no longer minified and hence larger than before. Bundling a minfied bundle with other bundlers (like terser) in dependent projects might cause trouble. Additionally, minifying a bundle has no benefit in execution time, it's just a size difference (related bugs: #31, #34, #38).
New point release
- Added exports for the profiling classes.
- Reverted some changes that failed the Java runtime tests.
New point release
- Added RuleContext.toStringTree overload.
- Added an InterpreterDataReader implementation (copied from the vscode-antlr4 extension).
- Benchmark values listed here are now computed from 5 runs, instead just one.
- Added
RuleContext.toStringTree()
overload.
New point release
- Optimizations in HashMap and HashSet (from Peter van Gulik). This can have dramatic speed improvements, depending on the grammar. In the unit tests this shows mostly by a faster cold start.
- Added CommonJS builds back. Especially when running unit tests using Node.js a CommonJS variant is simpler to handle.
- Added clearDFA() methods in the simulators.
New point release
- Profiler port (from backspace [email protected])
- Changed context getters in
ParserRuleContext
for retrieving sub contexts to accept any constructor parameter, for more flexibility.
New point release
- Code generation improvements, especially for local rule attributes. Attributes in a rule (which are implemented as local variables in the generated code) can be unassigned and need extra null-safety checks (the ? operator) or non-null assertions. The code generator now adds these checks automatically.
ParserRuleContext.getChild
now accepts any constructor type.
New point release
Code generation improvements, especially for local rule attributes. Attributes in a rule (which are implemented as local variables in the generated code) can be unassigned and need extra null-safety checks (the ? operator) or non-null assertions. The code generator now adds these checks automatically.
New point release
This is a combined release of the antlr4ng runtime and the cli tool for it. It combines 2 small changes:
- Removed last reference to a Node.js specific type (Buffer), which avoids the automatic reference to the Node.js typings and an "resolution-mode" assertion for "require" (CommonJS).
- The tool now produces optional attributes in rule contexts. For example such a rule:
switchLabel
: CASE (constantExpression=expression | enumConstantName=IDENTIFIER | typeType varName=identifier) ':'
| DEFAULT ':'
;
contains some attributes (e.g. enumConstantName
) which generate a local variables in the SwitchLabelContext
. However, they aren't always assigned a value (depending on the path taken in that rule), so they must be optional or you get an error from tsc about not initialised variables.