cplusplus / cplusplus/draft

[C++29] Dissolve [lex] into the rest of the standard

Open
#7,441 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

P3-Other
Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

This is a suggestion for work as part of the broader C++29 chapter cleanup proposed in #7399. It is filed as its own issue to try to establish consensus to add an actionable item to that plan.

The proposal comes in a few stages:

First, make a clear separation between preprocessor phases 1-6 that entirely manipulate text, and C++ translation from phase 7 that adds syntactic and semantic analysis to the resulting tokens. This mostly means clearly separating out of identifiers and string literals the preprocessor specific aspects, likely into pp-identifiers and pp-string-literals.

Once the parts are properly separated, I would suggest moving the phases of translation into the intro material along side the definition of the abstract machine. This would also be a good place to move our definition of the term program.

The preprocessor side of lexing could then move to the start of [cpp], and the material on syntactic and semantic analysis of token would move into [basic].

We might then consider moving some aspects of [basic], such as the memory and concurrency models, into [intro] describing how the abstract machine maps to a real world execution environment.

This would achieve the aims originally espoused in #2252

Contributor guide

No contributing guide indexed for this repository

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 the broader cleanup proposal in #7399 and the original aims in #2252, then review the [lex], [intro], [cpp], and [basic] sections around translation phases 1–7 and the abstract machine. The work is done only when the proposed separation and chapter moves have consensus and are reflected consistently in the draft.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.