ANTRL4: Can't get Python ANTLR to generate a graphic of the parse tree
问题 I have a simple HelloWorld.g4 grammar (see it at the bottom). I am able to successfully generate the .py files using this: set CLASSPATH=.;antlr-complete.jar;%CLASSPATH% java org.antlr.v4.Tool -Dlanguage=Python2 HelloWorld.g4 Now I would like to use the TestRig with the -gui flag to generate a parse tree GUI. I have the ANTRL Python runtime installed ( antlr4-python2-runtime-4.5.tar.gz ). I can open a Python interpreter and type: import antlr4 and the interpreter recognizes the antlr4 module.