This is the home for the Rust Grammar Working Group. The goal of the working group is to satisfy RFC 1331 and produce a testable, canonical grammar for the Rust language. The primary audiences for the grammar are:
The grammar tools produced here are not intended to be used directly within rustc, or any other existing tools.
Meetings take place on the #wg-grammar channel on Discord at 20:00 CET every other Wednesday. Feel free to drop by the Discord channel if you are interested!
This project includes a executable binary for exercising the grammar. Use cargo run
to build and run it. Using --release
is encouraged as it is many times faster. It supports several subcommands to point it at different files or directories to examine. For example, if you check out the submodule (explained below), you can run the tests with the following command:
cargo run --release -- dir external/rust/src
This repository includes a submodule to the main rust repo to use as a collection of Rust code to test against the grammar. The command git submodule update --init
may be used to fetch it. However, it is not necessary and you may run the tool against any collection of Rust code at your disposal.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.