Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make lexer tests runable again #20245

Merged
merged 2 commits into from
Dec 30, 2014

Conversation

fhahn
Copy link
Contributor

@fhahn fhahn commented Dec 26, 2014

I would like to look into some issues related to the model lexer #15883.

I stumbled upon 2 minor problems when I tried running the lexer tests:

  • antlr did not put the generated files in the correct directory
  • grammer/verify.rs did not work with the most recent version of rust

With these changes (and setting CLASSPATH=/usr/share/java/antlr-4.4-complete.jar:$CLASSPATH) I was able to execute the tests.

Note that I just fixed the syntax errors and added None as 2. argument of Literal. I am not sure if this is correct however. I still have to take a closer look at what verify.rs actually does. Are there any helpful pointers?

@rust-highfive
Copy link
Collaborator

r? @pcwalton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

Thanks for this!

cc @cmr, the original author of this infrastructure

@emberian
Copy link
Member

Looks great thanks! The purpose of verify.rs is to print out tokens in the same way as the antlr tool to compare their output, to ensure the model matches reality.

@fhahn fhahn force-pushed the make-lexer-tests-runable-again branch from e8a07cf to adda899 Compare December 29, 2014 18:41
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Dec 30, 2014
I would like to look into some issues related to the model lexer  rust-lang#15883.

I stumbled upon 2 minor problems when I tried running the lexer tests:

* antlr did not put the generated files in the correct directory
* grammer/verify.rs did not work with the most recent version of rust

With these changes (and setting CLASSPATH=/usr/share/java/antlr-4.4-complete.jar:$CLASSPATH) I was able to execute the tests.

Note that I just fixed the syntax errors and added `None` as 2. argument of `Literal`. I am not sure if this is correct however. I still have to take a closer look at what verify.rs actually does. Are there any helpful pointers?
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Dec 30, 2014
This patch for rust-lang#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, rust-lang#20245 should land first.
@bors bors merged commit adda899 into rust-lang:master Dec 30, 2014
@fhahn fhahn deleted the make-lexer-tests-runable-again branch December 30, 2014 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants