[lex.phases] Some unused links are useful
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
[lex.phases]/1.3
The source file is decomposed into preprocessing tokens ([lex.pptoken]) and sequences of whitespace characters (including comments). A source file shall not end in a partial preprocessing token or in a partial comment. Each comment is replaced by one space character. New-line characters are retained. Whether each nonempty sequence of whitespace characters other than new-line is retained or replaced by one space character is unspecified. The process of dividing a source file's characters into preprocessing tokens is context-dependent.
After this phase, the sequence of the tokens in a source file should be in compliance with that specified by preprocessing-file that is defined in [cpp.pre], it is unused in the current draft but it is useful to interpret what is a valid sequence of preprocessing tokens in a source file. For instance
// a.h
// b.cpp
#include "a.h"
module ;
export module X;
b.cpp is an invalid source file after translation phase 3 even though a.h is empty. A valid processing file is either group<opt> or module-file but not both.
[lex.phases]/1.7
Whitespace characters separating tokens are no longer significant. Each preprocessing token is converted into a token ([lex.token]). The resulting tokens are syntactically and semantically analyzed and translated as a translation unit.
translation-unit is defined in [basic.link] and is unused in the current draft. However, it is useful to interpret what the grammar or resulting tokens should be in a valid translation unit, translation-unit specifies that and is useful here.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with [lex.phases]/1.3 and /1.7, then inspect the referenced [cpp.pre], preprocessing-file, module-file, and translation-unit definitions in the current draft. Determine whether these links should remain useful normative references, and consider the issue resolved when the relevant cross-references and surrounding wording accurately support the examples without leaving misleading unused links.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- tex
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100