Enable testing of grammars with Antlr4ng #4019
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the grammars and build to test using the Typescript tool and runtime Antlr4ng for certain Antlr4 grammars. The target
Antlr4ng
is added to the grammar's desc.xml where the target works.Antlr4ng is @mike-lischke 's updated TypeScript target, improving on many issues with the Antlr4 TypeScript target version 4.13.1. The reason it is added is because there will likely not be any further releases of Antlr4. In fact, for grammars that have TypeScript target-specific support code, Antlr 4.13.1 TypeScript runtime does not work with newer versions of tsc/Node because the generated parser and lexer cannot run (it cannot find the compiled base class files). The only hope is to use Antlr4ng.
This PR made the following changes.
Antlr4ng
into<targets>
sections in desc.xml. This tells trgen that the grammar works for Antlr4ng. Otherwise, the grammar DOES NOT work for the target. No split grammars with a base class are working yet. The assumption is that it should work. If not, we can ask Mike to make a fix and cut an immediate release. Mike is a much more responsive partner in fixing bugs.