This solution is preferrable because it associates the required options with the grammar rather than ANTLR invocation. In ANtlr3 I could specify the template group from the parser. ANTLR 4 does not have an output antlr options output template 8931 (or rewrite option). In ANTLR 4, you would implement a listener for the parse tree automatically generated by the grammar, and perform all of templste StringTemplate operations within the listener.
Default is Java. See Code Generation Targets for list of currently supported target languages.tokenVocabWhere ANTLR should get predefined tokens and token types. Tree grammars need it to get the natlr types from the parser that creates its trees. TODO: Default value. Valid values are AST and template. TODO: Briefly, what are the interpretations of these values. Without this option, trees are of type Object. Feel free to try them out by getting the current development version from Antlr options output template 8931 note that the Python target is (compared to most other targets) rather young.
I would consider it to be in beta state. This means that most parts are working (big exception are template output), but bugs and problems are to be expected and documentation is pretty poor. It still has to prove itself in a real world application (which is currently being done).Both the runtime module and the code generation templates should now be feature complete and in sync with the Java target, except for the features listed below.
But large parts of the runtime are still untested.WARNING: Currently the templte library for V3.1 is not compatible with recognizers generated by ANTLR V3.0.x. If you are an application developer, then the sugge.
Antlr options output template 8931