rust-lang / rust-lang/fls

RFC 0879 Small-base lexing

Open
#602 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
reStructuredText
Stars
497
Forks
41
Avg merge
3h 52m
Merged PRs (30d)
4

Description

RFC 0879 (rust-lang/rfcs#0879, which was before Rust 1.0) decided that a form like 0b123 or 0o189 should be rejected, rather than being interpreted as 0b1 followed by 23 or 0o1 followed by 89.

The FLS doesn't currently model this.

The Reference models this as part of lex.token.literal.reserved.syntax, by treating these as reserved forms. That means that, as in #601, it uses grammar productions which don't overlap with the productions for accepted tokens.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading RFC 0879 and the Reference's lex.token.literal.reserved.syntax treatment, then inspect how the FLS models the related case in #601. Locate the relevant lexer grammar in the specification and model 0b123 and 0o189 as reserved forms without overlapping accepted-token productions; done means the FLS reflects the Reference behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.