2014-07-14 10:52:18 +02:00
|
|
|
Reference grammar.
|
|
|
|
|
|
|
|
Uses [antlr4](http://www.antlr.org/) and a custom Rust tool to compare
|
2014-07-22 04:26:20 +02:00
|
|
|
ASTs/token streams generated. You can use the `check-syntax` make target to
|
|
|
|
run all of the available tests.
|
2014-07-14 10:52:18 +02:00
|
|
|
|
2014-07-22 04:26:20 +02:00
|
|
|
To use manually:
|
2014-07-14 10:52:18 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
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.
|