ANTLR4 graps (Grammar Parsing Service) is a TypeScript node module using the TypeScript ANTLR runtime (antlr4ts) created by Sam Harwell. At the time being this runtime is still considered alpha, while it works already quite well.
You can find details about (interactive) use and all available public functions and structures in the api reference file.
tsc, but better is to launch the tests with additional parameters like this:
mocha --compilers ts:ts-node/register,tsx:ts-node/register
Additionally, there is a 'Mocha' setup for Visual Studio Code, which even allows to debug the tests. You have to install the node modules "mocha" and "chai" locally for this to work.
When looking for dependencies a simple search for .g and .g4 files is applied to find the files. This can fail if the grammar extension is different or the files are not all in the same folder.
The module is in a pretty good shape now and fully functional, but there are ideas to add more functionality, like:
I'd love to see code contributions, to make the module evolve quicker.
For release details see Git commit history.