Skip to content

Conversation

@kaby76
Copy link
Contributor

@kaby76 kaby76 commented Oct 30, 2025

This PR fixes #4514. The Rust target for Antlr has improved quite a bit, and it now stands to set up testing for it.

Currently, the .jar is located here: https://github.com/antlr4rust/antlr4/releases/download/v0.5.0/antlr4-4.13.3-SNAPSHOT-complete.jar

The crate for the Antlr runtime is here: https://crates.io/crates/antlr4rust/

The build scripts download the .jar file to the build area, ensuring that the versions of the tool and runtime are contained within the Trgen templates for Rust.

I altered the desc.xml for abb, c, and the java20 grammars for testing the Rust target. All works fine!

The Rust target is a great addition to Antlr4. Parsers using Rust are generally near the top for all targets. As mentioned elsewhere, here are the performances of the parser targets for the c and java20 grammars. The last bar column in each is the Rust target (shorter means faster runtime).

times

times

@kaby76 kaby76 marked this pull request as ready for review October 30, 2025 23:06
@kaby76 kaby76 changed the title [build] Add Rust target and a couple of ports. [build] Add Rust target and a couple of grammars for testing. Oct 30, 2025
@kaby76 kaby76 changed the title [build] Add Rust target and a couple of grammars for testing. [build] Add Rust target testing with a few grammars. Oct 31, 2025
@teverett
Copy link
Member

teverett commented Nov 1, 2025

@kaby76 thanks!

@teverett teverett merged commit 1b6a2ea into antlr:master Nov 1, 2025
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add in Rust target.

2 participants