rust/src/grammar
Huon Wilson 7586abf01b Adjust Antlr4 lexer to include suffixes.
This makes the formal lexical grammar (more closely) reflect the one
implemented by the compiler.
2014-11-20 00:02:42 +11:00
..
.gitignore
check.sh
raw-string-literal-ambiguity.md
README.md
RustLexer.g4 Adjust Antlr4 lexer to include suffixes. 2014-11-20 00:02:42 +11:00
verify.rs Update src/grammar for language changes. 2014-11-19 13:10:43 +11:00

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.