File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11### JavaScript
22
33#### Command line example for node.js:
4- - first copy the two grammar files and the test .py to this directory
4+ - first copy the two grammar files and the example .py to this directory
55
66Unix:
77``` bash
88 cp ../* .g4 .
9- cp ../examples/test .py .
9+ cp ../example .py .
1010```
1111
1212Windows:
1313``` bash
1414 copy ..\* .g4
15- copy ..\e xamples \t est .py
15+ copy ..\e xample .py
1616```
1717
1818``` bash
1919antlr4 -Dlanguage=JavaScript PythonLexer.g4
2020antlr4 -Dlanguage=JavaScript PythonParser.g4
21- node grun_tokens.js test .py
21+ node grun_tokens.js example .py
2222```
2323
2424#### Related link:
Original file line number Diff line number Diff line change 11### Python 3
22
33#### Command line example:
4- - first copy the two grammar files and the test .py to this directory and run the transformGrammar.py file
4+ - first copy the two grammar files and the example .py to this directory and run the transformGrammar.py file
55
66Unix:
77``` bash
88 cp ../* .g4 .
9- cp ../examples/test .py .
9+ cp ../example .py .
1010 python transformGrammar.py
1111```
1212
1313Windows:
1414``` bash
1515 copy ..\* .g4
16- copy ..\e xamples \t est .py
16+ copy ..\e xample .py
1717 python transformGrammar.py
1818```
1919
2020``` bash
2121antlr4 -Dlanguage=Python3 PythonLexer.g4
2222antlr4 -Dlanguage=Python3 PythonParser.g4
23- pygrun --tokens Python file_input test .py
24- pygrun --tree Python file_input test .py
23+ pygrun --tokens Python file_input example .py
24+ pygrun --tree Python file_input example .py
2525```
2626
2727#### Related link:
You can’t perform that action at this time.
0 commit comments