Releasing the runtime with the tool ensures that you can get the exact same behavior across many languages: Java, C#, Python, JavaScript, Go, Swift and C++.
The C# target for ANTLR 4 requires Java for *generating* C# code (but the applications compiled from this C# code will not require Java to be installed).
You can install *any* of the following versions of Java to use this target.
If you already have one of the following installed, you should check to make sure the installation is up-to-date.
Of course, the generated code is not going to meet your requirement by magic.
There are 3 ways to use the generated code:
- by generating a parse tree, and traversing it using a listener. This is the most common method.
- by generating a parse tree, and traversing it using a visitor. This requires the -visitor option, and is a bit more work.
- by providing code within your grammar, which gets executed when your input files are parsed.
While the latter works, it is no longer the recommended approach, because it is not portable, and harder to maintain. More importantly, it breaks the parsing when your code breaks.
See the web site for examples of using the generated code.