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

Document RFC 0879 (small-base-lexing) and RFC 0463 (future-proof-literal-suffixes) #298

Closed
alercah opened this issue Apr 3, 2018 · 4 comments · Fixed by #1305
Closed
Labels
A-grammar Area: Syntax and parsing C-bug Incorrect statements, terminology, or rendering issues Easy We believe this would not be difficult to actually fix

Comments

@alercah
Copy link
Contributor

alercah commented Apr 3, 2018

RFC 0879
[RFC 0463](https://github.com/rust-lang/rfcs/blob/master/text/0463-future-proof-literal-suffixes.md

@alercah alercah changed the title Review RFC 0879 (small-base-lexing) Document RFC 0879 (small-base-lexing) Apr 3, 2018
@alercah
Copy link
Contributor Author

alercah commented Apr 3, 2018

Our grammar in https://doc.rust-lang.org/nightly/reference/tokens.html#number-literals currently does not document that octal and binary literals are lexed with all decimal digits; it should do so and then remark in the prose that such literals are lexed as one token but are semantically invalid.

@alercah alercah added C-bug Incorrect statements, terminology, or rendering issues Easy We believe this would not be difficult to actually fix labels Apr 3, 2018
@alercah alercah changed the title Document RFC 0879 (small-base-lexing) Document RFC 0879 (small-base-lexing) and RFC 0464 (future-proof-literal-suffixes) Apr 4, 2018
@alercah alercah changed the title Document RFC 0879 (small-base-lexing) and RFC 0464 (future-proof-literal-suffixes) Document RFC 0879 (small-base-lexing) and RFC 0463 (future-proof-literal-suffixes) Apr 4, 2018
@alercah
Copy link
Contributor Author

alercah commented Apr 4, 2018

Added RFC 0463 since it's in the same place and serves a similar purpose.

@ehuss ehuss added the A-grammar Area: Syntax and parsing label Mar 11, 2019
@kubycsolutions
Copy link

Just checking my understanding: You're saying that the lexer sees 0b110127 as a malformed token rather than a BIN_LITERAL immediately followed by a DEC_LITERAL as the documentation suggests it should?

If so, are you sure you want to change the doc rather than the lexer?

@mattheww
Copy link
Contributor

mattheww commented Nov 3, 2022

The current documentation is correct for numeric literals (and what it says is that 0b110127 is a reserved form).

This issue is still open because suffixes on string literals aren't completely documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-grammar Area: Syntax and parsing C-bug Incorrect statements, terminology, or rendering issues Easy We believe this would not be difficult to actually fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants