How to generate the python files using antlr v4 plugin in IntelliJ?

Solution 1:

Add a language=...; to the options { ... } of your grammar:

grammar Test;

options {
  language=Python3;
}

parse
 : ANY*? EOF
 ;

ANY
 : .
 ;

Or right click the grammar and choose the option Configure ANTLR..., and then set the language property in there.