- Installed ANTLR4-tools
- Installed Node.js
- first download the necessary node modules and set the
typefield in thepackage.jsonthen copy the two grammar files and example.py to this directory:
npm install antlr4
npm install iconv-lite
npm install webpack
npm pkg set type=moduleLinux:
cp ../*.g4
cp ../example.pyWindows:
copy ..\*.g4
copy ..\example.pyantlr4 -Dlanguage=JavaScript PythonLexer.g4
antlr4 -Dlanguage=JavaScript PythonParser.g4
node grun4py.js example.py