Maven generates python code for python3 ANTLR grammar file

I downloaded Python3 grammar file for ANLTR4 and when I run mvn generate-sources in eclipse, the generated file contains some Java and some Python code eg.:

private void NEWLINE_action(RuleContext _localctx, int actionIndex) {
        switch (actionIndex) {
        case 0:

            tempt = Lexer.text.fget(self)
            newLine = re.sub("[^\r\n\f]+", "", tempt)
            spaces = re.sub("[\r\n\f]+", "", tempt)
            la_char = ""

antlr dependency in pom :


any suggestions?

Read more here:

Content Attribution

This content was originally published by Joe S at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: