Revert "Panic if the grammar verifier sees a token it doesn't recognize"#25537
Merged
bors merged 1 commit intorust-lang:masterfrom May 18, 2015
carols10cents:grammar-oops
Merged
Revert "Panic if the grammar verifier sees a token it doesn't recognize"#25537bors merged 1 commit intorust-lang:masterfrom carols10cents:grammar-oops
bors merged 1 commit intorust-lang:masterfrom
carols10cents:grammar-oops
Conversation
This reverts commit 9c7d5ae. This was wrong... the `continue` was to ignore the latter half of the tokens file. Another mechanism will have to be used to keep the model grammar's tokens in sync with the actual grammar's tokens :-/
Contributor
|
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
Member
|
@bors: r+ e70c858 No worries, thanks for the fix! |
Member
|
@bors: rollup |
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
May 18, 2015
…richton Hiiii soooo I'm trying to get the reference grammar and associated tests running again, and I swear I tested before but I must have had multiple things going on when I did, because the change I made in rust-lang#25137 to verify.rs is totally wrong. The RustLexer.tokens file that antlr generates has two sections: ``` EQ=1 LT=2 LE=3 EQEQ=4 NE=5 ... COMMENT=56 SHEBANG=57 UTF8_BOM=58 '='=1 '<'=2 '<='=3 '=='=4 ... ``` and verify.rs is only interested in the first half-- the `continue` is to ignore the second half. In 9c7d5ae, I made it panic instead. I was trying to make sure verify.rs handled everything that might happen in the first half and complain if it didn't. That would mean the reference grammar was out of sync with at least verify.rs, if not the real grammar. But it's totally ok for verify.rs to not handle the entire second half of the file. I'm sorry for breaking this :( Good thing these tests aren't being run regularly yet...? 😳
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hiiii soooo I'm trying to get the reference grammar and associated tests running again, and I swear I tested before but I must have had multiple things going on when I did, because the change I made in #25137 to verify.rs is totally wrong. The RustLexer.tokens file that antlr generates has two sections:
and verify.rs is only interested in the first half-- the
continueis to ignore the second half. In 9c7d5ae, I made it panic instead. I was trying to make sure verify.rs handled everything that might happen in the first half and complain if it didn't. That would mean the reference grammar was out of sync with at least verify.rs, if not the real grammar. But it's totally ok for verify.rs to not handle the entire second half of the file.I'm sorry for breaking this :( Good thing these tests aren't being run regularly yet...? 😳