ANTLR4 allows to put code in arbitrary programming language in grammars. But is it possible to put code in different programming languages and select only those that are specified in the target programming language during code-generation?
For example if I have actions in Java and Python can I somehow select only those of them that are in Python when I generate the parsing code?