antlr/antlr4-tools hiện có 118 sao trên GitHub, viết chủ yếu bằng Python. Tools to run antlr4 w/o needing to install java or antlr4!
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Tools to run antlr4 w/o needing to install java or antlr4! The only requirement is Python3, which is typically installed on all developer machines on all operating systems.
Install
$ pip install antlr4-tools
That creates antlr4 and antlr4-parse executables. On Windows, of course, this doesn't just work. You need to add the ...\local-packages\python38\scripts dir to your PATH, which itself might require a fun reboot or perhaps reinstall of the OS. haha.
Windows-specific issues
On Windows, the pip command doesn't just work---you need to add the ...\local-packages\python38\scripts dir to your PATH, which itself might require a fun reboot. If you use WSL on Windows, then the pip install will also properly at the scripts directly (if you run from bash shell).
Go to the Microsoft Store
Search in Microsoft Store for Python
Select the newest version of Python (3.10).
Click the "Get" button. Store installs python and pip at "c:\Users...\AppData\Local\Microsoft\WindowsApps\python.exe" and "c:\Users...\AppData\Local\Microsoft\WindowsApps\pip.exe", respectively. And, it updates the search path immediately with the install.
Open a "cmd" terminal.
You can now type "python" and "pip", and "pip install antlr4-tools". 7. Unfortunately, it does not add that to the search path.
Update the search path to contain c:\Users...\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p8\LocalCache\local-packages\Python310\Scripts. You may need to install MSYS2, then do a find /c/ -name antlr4.exe 2> /dev/null and enter that path.
Or, you can set up an alias to antlr4.exe on that path.
The good news is that the ANTLR4 Python tool downloads the ANTLR jar in a standard location, and you don't need to do that manually. It's also possible to go in a browser, go to python.org, and download the python package. But, it's likely you will need to update the path for antlr4.exe as before.
First run will install Java and ANTLR
If needed, antlr4 will download and install Java 11 and the latest ANTLR jar:
$ antlr4
Downloading antlr4-4.11.1-complete.jar
ANTLR tool needs Java to run; install Java JRE 11 yes/no (default yes)? y
Installed Java in /Users/parrt/.jre/jdk-11.0.15+10-jre; remove that dir to uninstall
ANTLR Parser Generator Version 4.11.1
-o ___ specify output directory where all output is generated
-lib ___ specify location of grammars, tokens files
...
To override the version of ANTLR jar used, you can pass a -v <version> argument or set ANTLR4_TOOLS_ANTLR_VERSION environment variable:
$ antlr4 -v 4.9.3
ANTLR Parser Generator Version 4.9.3
-o ___ specify output directory where all output is generated
-lib ___ specify location of grammars, tokens files
...
$ ANTLR4_TOOLS_ANTLR_VERSION=4.10.1 antlr4
ANTLR Parser Generator Version 4.10.1
-o ___ specify output directory where all output is generated
-lib ___ specify location of grammars, tokens files
...
Running ANTLR tool on grammars
The antlr4 command forwards all arguments (besides -v mentioned above) to the actual ANTLR tool command:
The antlr4-parse command requires ANTLR 4.11 and above (but any version of ANTLR works for the plain antlr4 command). It accepts the same -v argument or environment variable to override the ANTLR jar version used. (Note: ^D means control-D and indicates "end of input" on Unix but use ^Z on Windows.)
antlr/antlr4-tools có 118 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/antlr/antlr4-tools. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
antlr/antlr4-tools có phải mã nguồn mở không?
Có — antlr/antlr4-tools phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/antlr/antlr4-tools.
antlr/antlr4-tools có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho antlr/antlr4-tools. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
antlr/antlr4-tools có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho antlr/antlr4-tools. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
antlr/antlr4-tools còn đang phát triển không?
Commit gần nhất trên antlr/antlr4-tools là 1.6 năm trước (theo timestamp GitHub). Repo có 29 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Đọc thêm về antlr/antlr4-tools ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/antlr/antlr4-tools là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
antlr4-tools có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về antlr4-tools.