[build] Add Rust target testing with a few grammars. #4665
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).