Skip to content

Releases: mike-lischke/antlr4ng

New major release

02 Mar 20:42
v3.0.0
64d32c3
Compare
Choose a tag to compare

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

02 Mar 20:41
v2.0.0-cli
77d0d47
Compare
Choose a tag to compare

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

26 Feb 08:29
v2.0.11
ab4462f
Compare
Choose a tag to compare
  • 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

27 Jan 17:42
v2.0.9
55c2c0d
Compare
Choose a tag to compare
  • Added exports for the profiling classes.
  • Reverted some changes that failed the Java runtime tests.

New point release

20 Jan 15:15
v2.0.7
7fa4a9a
Compare
Choose a tag to compare
  • 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

18 Jan 13:59
v2.0.6
591f648
Compare
Choose a tag to compare
  • 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

01 Jan 12:50
v2.0.5
54f92a4
Compare
Choose a tag to compare
  • 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

17 Dec 14:34
v2.0.4
52c66f7
Compare
Choose a tag to compare
  • 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

17 Dec 14:39
v.1.0.7-cli
3de5b41
Compare
Choose a tag to compare

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

08 Dec 15:11
v2.0.3
243bffc
Compare
Choose a tag to compare

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.