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

Possible mistake in lexer rule for octal integer #42638

Merged
merged 1 commit into from
Jun 14, 2017
Merged

Possible mistake in lexer rule for octal integer #42638

merged 1 commit into from
Jun 14, 2017

Conversation

arthrarnld
Copy link

Original rule allowed for digits 0-8, but octal is 0-7.

The compiler correctly prevents you from placing an 8 in an octal, so I'm assuming this is caught on a later stage. Still, shouldn't the lexer already catch this?

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@petrochenkov
Copy link
Contributor

@arthurpaimarnold
src/grammar/lexer.l is not the lexer used by the compiler.
If you are reading it as a reference to Rust grammar, be prepared to see something outdated or erroneous, I'm not sure if it's even tested.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 13, 2017

📌 Commit c291e87 has been approved by petrochenkov

@arthrarnld
Copy link
Author

@petrochenkov, I wasn't aware of that. Could you point me to the actual lexer? :)

@jonas-schievink
Copy link
Contributor

@arthurpaimarnold It's in src/libsyntax/parse/lexer/mod.rs

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Jun 13, 2017
…al, r=petrochenkov

Possible mistake in lexer rule for octal integer

Original rule allowed for digits 0-8, but octal is 0-7.

The compiler correctly prevents you from placing an 8 in an octal, so I'm assuming this is caught on a later stage. Still, shouldn't the lexer already catch this?
@arielb1 arielb1 added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 13, 2017
bors added a commit that referenced this pull request Jun 14, 2017
Rollup of 6 pull requests

- Successful merges: #42408, #42428, #42496, #42597, #42636, #42638
- Failed merges: #42612
@bors bors merged commit c291e87 into rust-lang:master Jun 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants