rust/src/grammar
2014-07-21 18:38:40 -07:00
..
.gitignore Byte/raw binary literal fixes 2014-07-21 10:59:58 -07:00
check.sh Add a ton of ignore-lexer-test 2014-07-21 18:38:40 -07:00
raw-string-literal-ambiguity.md Add raw string literal ambiguity document 2014-07-21 10:59:57 -07:00
README.md Lexer; subtly wrong; no makefile 2014-07-21 10:59:57 -07:00
RustLexer.g4 Byte/raw binary literal fixes 2014-07-21 10:59:58 -07:00
verify.rs Shuffle around check-lexer conditions 2014-07-21 18:38:40 -07:00

Reference grammar.

Uses antlr4 and a custom Rust tool to compare ASTs/token streams generated.

To use:

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.