ANN: antlr-tgen, the standalone ANTLR test generator

19 views
Skip to first unread message

Mike Lischke

unread,
Feb 6, 2024, 2:10:09 PMFeb 6
to 'ANTLR announcements
What is this about?

I'm happy to announce the immediate availability of a new tool (written as Node.js package: https://www.npmjs.com/package/@mike-lischke/antlr-tgen) which allows to generate all ANTLR runtime tests in a standalone fashion. It's called antlr-tgen (ANTLR Test Generator). The repository is here: https://github.com/mike-lischke/antlr-tgen and the tool is released under the MIT license.

Its purpose is the separation of the runtime test creation from the ANTLR repository to allow running the tests independent of ANTLR. This is mostly useful for target runtime developers who need to continuously check if all runtime tests succeed, while working on their runtime. The single most advantage of this approach is that test execution is much faster than before, because the isolated tests can be executed in a way that much better matches the target language. For my TypeScript runtime this brought down the test time from 2 minutes to ~10 seconds, just by taking advantage of this separation (and not generating all tests over and over again). 

Some more details

Even though the generator is a Node.js tool, it can generate the tests for all currently supported target languages of ANTLR4.

Regards,
Reply all
Reply to author
Forward
0 new messages