rust/src/grammar
Alex Crichton 021c2f3712 rollup merge of #20310: fhahn/issue-15877-model-lexer-range
This patch for #15877 uses Antlr's input lookahead (`_input.LA(1) != '.'`) to solve the conflict between the LIT_FLOAT and the range syntax.

Note that in order to execute the grammar tests, #20245 should land first.
2014-12-29 16:36:55 -08:00
..
.gitignore
check.sh
raw-string-literal-ambiguity.md adding proof of context-sensitivy of raw string literals 2014-07-27 02:13:19 -04:00
README.md Don't run lexer tests by default 2014-07-21 19:26:20 -07:00
RustLexer.g4 Handle range in model lexer correctly #15877 2014-12-29 21:29:31 +01:00
verify.rs Update grammer/verify.rs to work with recent master 2014-12-29 19:40:40 +01: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.