rust/src/grammar
Vadim Petrochenkov f284cbc7af Cleanup interfaces of Name, SyntaxContext and Ident
Make sure Name, SyntaxContext and Ident are passed by value
Make sure Idents don't serve as keys (or parts of keys) in maps, Ident comparison is not well defined
2015-09-24 23:05:02 +03:00
..
.gitignore Byte/raw binary literal fixes 2014-07-21 10:59:58 -07:00
check.sh Model lexer: Fix remaining issues 2015-04-21 12:02:12 +02:00
lexer.l Use consistent terminology for byte string literals 2015-09-03 10:54:53 +03:00
parser-lalr-main.c Add a LALR grammar for Rust with testing support 2015-01-20 18:47:17 -08:00
parser-lalr.y Use consistent terminology for byte string literals 2015-09-03 10:54:53 +03:00
raw-string-literal-ambiguity.md adding proof of context-sensitivy of raw string literals 2014-07-27 02:13:19 -04:00
README.md Model lexer: Fix remaining issues 2015-04-21 12:02:12 +02:00
RustLexer.g4 Use consistent terminology for byte string literals 2015-09-03 10:54:53 +03:00
testparser.py Move compile-fail tests that are rejected by the parser to parse-fail 2015-02-06 22:23:16 +01:00
tokens.h Use consistent terminology for byte string literals 2015-09-03 10:54:53 +03:00
verify.rs Cleanup interfaces of Name, SyntaxContext and Ident 2015-09-24 23:05:02 +03:00
xidcontinue.g4 Finished unicode support in the model lexer. 2015-04-19 23:05:32 +02:00
xidstart.g4 Finished unicode support in the model lexer. 2015-04-19 23:05:32 +02:00

Reference grammar.

Uses antlr4 and a custom Rust tool to compare ASTs/token streams generated. You can use the check-lexer 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" RustLexer.tokens || 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.