- Installed ANTLR4-tools
- Installed Python 3
- Installed ANTLR4 Python 3 runtime
- first copy the two grammar files and the example.py to this directory:
Linux:
cp ../*.g4
cp ../example.pyWindows:
copy ..\*.g4
copy ..\example.pyantlr4 -Dlanguage=Python3 PythonLexer.g4
antlr4 -Dlanguage=Python3 PythonParser.g4
python grun4py.py example.py
pygrun --tree Python file_input example.py