File tree Expand file tree Collapse file tree 4 files changed +28
-13
lines changed
Expand file tree Collapse file tree 4 files changed +28
-13
lines changed Original file line number Diff line number Diff line change 11### C# implementation
22
3+ #### Prerequisites:
4+ - Installed [ ANTLR4-tools] ( https://github.com/antlr/antlr4/blob/master/doc/getting-started.md#getting-started-the-easy-way-using-antlr4-tools )
5+ - Installed [ .NET Framework] ( https://dotnet.microsoft.com/en-us/download/dotnet-framework )
6+
7+
38#### Command line example for Windows:
49 - first create a C# project called grun_tokens then copy the two grammar files and example.py to this directory:
510``` bash
@@ -21,10 +26,5 @@ dotnet run example.py --no-build
2126```
2227
2328
24- #### Prerequisites:
25- - Installed [ ANTLR4-tools] ( https://github.com/antlr/antlr4/blob/master/doc/getting-started.md#getting-started-the-easy-way-using-antlr4-tools )
26- - Installed [ .NET Framework] ( https://dotnet.microsoft.com/en-us/download/dotnet-framework )
27-
28-
29- #### Related links:
29+ #### Related link:
3030[ C# target] ( https://github.com/antlr/antlr4/blob/dev/doc/csharp-target.md )
Original file line number Diff line number Diff line change 11### Java 8 implementation
22
3+ #### Prerequisites:
4+ - Installed [ ANTLR4-tools] ( https://github.com/antlr/antlr4/blob/master/doc/getting-started.md#getting-started-the-easy-way-using-antlr4-tools )
5+
6+
37#### Command line example:
4- - first copy the two grammar files and the example.py to this directory
8+ - first copy the two grammar files and the example.py to this directory:
59
610Unix:
711``` bash
@@ -23,5 +27,6 @@ grun Python file_input -tokens example.py
2327grun Python file_input -gui example.py
2428```
2529
30+
2631#### Related link:
2732[ Java target] ( https://github.com/antlr/antlr4/blob/master/doc/java-target.md )
Original file line number Diff line number Diff line change 11### JavaScript implementation
22
3- #### Command line example for [ Node.js] ( https://nodejs.org/en/download ) :
3+ #### Prerequisites:
4+ - Installed [ ANTLR4-tools] ( https://github.com/antlr/antlr4/blob/master/doc/getting-started.md#getting-started-the-easy-way-using-antlr4-tools )
5+ - Installed [ Node.js] ( https://www.python.org/downloads/ )
6+
7+
8+ #### Command line example for Node.js:
49- first download the necessary node modules and set the ``` type ``` field in the ``` package.json ``` then copy the two grammar files and example.py to this directory:
510``` bash
611 npm install antlr4
@@ -26,6 +31,6 @@ antlr4 -Dlanguage=JavaScript PythonParser.g4
2631node grun_tokens.js example.py
2732```
2833
34+
2935#### Related link:
30- [ Node.js] ( https://nodejs.org/en/download )
3136[ JavaScript target] ( https://github.com/antlr/antlr4/blob/dev/doc/javascript-target.md )
Original file line number Diff line number Diff line change 11### Python 3 implementation
22
3+ #### Prerequisites:
4+ - Installed [ ANTLR4-tools] ( https://github.com/antlr/antlr4/blob/master/doc/getting-started.md#getting-started-the-easy-way-using-antlr4-tools )
5+ - Installed [ Python 3] ( https://www.python.org/downloads/ )
6+ - Installed [ ANTLR4 Python 3 runtime] ( https://pypi.org/project/antlr4-python3-runtime/ )
7+
8+
39#### Command line example:
4- - first copy the two grammar files and the example.py to this directory and run the transformGrammar.py file
10+ - first copy the two grammar files and the example.py to this directory and run the transformGrammar.py file:
511
612Unix:
713``` bash
@@ -24,7 +30,6 @@ pygrun --tokens Python file_input example.py
2430pygrun --tree Python file_input example.py
2531```
2632
27- #### Related link:
28- [ Python target] ( https://github.com/antlr/antlr4/blob/master/doc/python-target.md )
2933
30- [ ANTLR4 Python 3 runtime] ( https://pypi.org/project/antlr4-python3-runtime/ )
34+ #### Related link:
35+ [ Python 3 target] ( https://github.com/antlr/antlr4/blob/master/doc/python-target.md )
You can’t perform that action at this time.
0 commit comments