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

Connect pp-import to the preprocessor grammar #3575

Closed
wants to merge 1 commit into from

Conversation

daveedvdv
Copy link
Contributor

Clarify how the grammar pp-import relates to control-line.

Clarify how the grammar pp-import relates to control-line.
@@ -671,6 +676,9 @@
\indextext{header unit!preprocessing}%
\indextext{macro!import|(}%

\pnum
An \grammarterm{import-line} shall be of the form
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For "of the form" constraints, we usually don't show another non-terminal, but just the grammar sequence that needs to be satisfied. That said, I think the overall change is a net improvement.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that, but the subsequent text refers to things like "all three forms of pp-import" etc. So I thought it nice to keep that name. I suppose we could change it to "all three forms above" and "the second form", etc. Not sure if that would be better though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do the same thing in [class.conv.fct], which is much more egregious than this (it lists three productions and only means the first one). Though I do wonder if we can do better here; perhaps we could list pp-import as a control-line production (perhaps renaming it to import-line), and change [cpp.pre]/2 to say that a text-line is only matched if the line is not a preprocessor directive. (That way, an import directive that's not a pp-import would simply not match the preprocessor grammar, just like an unmatched #if or #endif.)

@jensmaurer jensmaurer added the changes requested Changes to the wording or approach have been requested and not yet applied. label Jan 14, 2020
@jensmaurer jensmaurer added the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Mar 12, 2020
@jensmaurer
Copy link
Member

Please rebase and force-push.

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 14, 2020

@daveedvdv: Could you please take @zygoloid's suggestion into consideration? And rebase?

@tkoeppe
Copy link
Contributor

tkoeppe commented Sep 16, 2022

We're not sure if this is editorial. We agree that there's a bug in the wording, but the detailed resolution needs oversight, too, so could you please raise this proposal as a CWG issue?

@tkoeppe tkoeppe closed this Sep 16, 2022
@jensmaurer
Copy link
Member

Fixed by 862fe4b (Feb 2020)
P1857R3 Modules Dependency Discovery

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes requested Changes to the wording or approach have been requested and not yet applied. needs rebase The pull request needs a git rebase to resolve merge conflicts.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants