mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-02 06:28:20 +03:00
9cc366311d
- Removes f128 from the grammar, which is no longer support in rustc - The fragment modifier is added so it won't parse float suffix as a separate token
Reference grammar.
Uses antlr4 and a custom Rust tool to compare
ASTs/token streams generated. You can use the check-syntax make target to
run all of the available tests.
To use manually:
antlr4 RustLexer.g4
javac *.java
rustc -O verify.rs
for file in ../*/**.rs; do
echo $file;
grun RustLexer tokens -tokens < $file | ./verify $file || break
done
Note That the ../*/**.rs glob will match every *.rs file in the above
directory and all of its recursive children. This is a zsh extension.