Simple change 4.0
to 4.2
in your antlr4-maven-plugin
's version tag.
Note that the plugin will recursively scan src/main/antlr4
for .g4
grammar files. If your grammar resides in src/main/antlr4/com/company
then the package of your generated parser/lexer files will be com.company
.
Here's a small template project to get you started, in case you need it: