|
495 | 495 | \indextext{token!preprocessing|(}%
|
496 | 496 | \begin{bnf}
|
497 | 497 | \nontermdef{preprocessing-token}\br
|
| 498 | + placeholder-keyword\br |
498 | 499 | header-name\br
|
499 |
| - import-keyword\br |
500 |
| - module-keyword\br |
501 |
| - export-keyword\br |
502 |
| - identifier\br |
503 | 500 | pp-number\br
|
| 501 | + identifier\br |
504 | 502 | character-literal\br
|
505 | 503 | user-defined-character-literal\br
|
506 | 504 | string-literal\br
|
|
515 | 513 | In this document,
|
516 | 514 | glyphs are used to identify
|
517 | 515 | elements of the basic character set\iref{lex.charset}.
|
518 |
| -The categories of preprocessing token are: header names, |
519 |
| -placeholder tokens produced by preprocessing \tcode{import} and \tcode{module} directives |
520 |
| -(\grammarterm{import-keyword}, \grammarterm{module-keyword}, and \grammarterm{export-keyword}), |
521 |
| -identifiers, preprocessing numbers, character literals (including user-defined character |
522 |
| -literals), string literals (including user-defined string literals), preprocessing |
523 |
| -operators and punctuators, and single non-whitespace characters that do not lexically |
| 516 | +The categories of preprocessing token are: |
| 517 | +placeholder keywords\iref{lex.placeholder}, |
| 518 | +header names\iref{lex.header}, |
| 519 | +preprocessing numbers\iref{lex.ppnumber}, |
| 520 | +identifiers\iref{lex.name}, |
| 521 | +character literals\iref{lex.ccon} including user-defined character literals, |
| 522 | +string literals\iref{lex.string} including user-defined string literals, |
| 523 | +preprocessing operators and punctuators\iref{lex.operators}, and |
| 524 | +single non-whitespace characters that do not lexically |
524 | 525 | match the other preprocessing token categories.
|
525 | 526 | If a \unicode{0027}{apostrophe} or a \unicode{0022}{quotation mark} character
|
526 | 527 | matches the last category, the program is ill-formed.
|
|
548 | 549 | shall have the lexical form of a keyword, an identifier, a literal,
|
549 | 550 | or an operator or punctuator.
|
550 | 551 |
|
551 |
| -\pnum |
552 |
| -The \grammarterm{import-keyword} is produced |
553 |
| -by processing an \keyword{import} directive\iref{cpp.import}, |
554 |
| -the \grammarterm{module-keyword} is produced |
555 |
| -by preprocessing a \keyword{module} directive\iref{cpp.module}, and |
556 |
| -the \grammarterm{export-keyword} is produced |
557 |
| -by preprocessing either of the previous two directives. |
558 |
| -\begin{note} |
559 |
| -None has any observable spelling. |
560 |
| -\end{note} |
561 |
| - |
562 | 552 | \pnum
|
563 | 553 | If the input stream has been parsed into preprocessing tokens up to a
|
564 | 554 | given character:
|
|
628 | 618 | \end{example}
|
629 | 619 | \indextext{token!preprocessing|)}
|
630 | 620 |
|
| 621 | +\rSec1[lex.placeholder]{Placeholder keywords} |
| 622 | +\indextext{keyword!placeholder|(}% |
| 623 | + |
| 624 | +\begin{bnf} |
| 625 | +\nontermdef{placeholder-keyword}\br |
| 626 | + import-keyword\br |
| 627 | + module-keyword\br |
| 628 | + export-keyword |
| 629 | +\end{bnf} |
| 630 | + |
| 631 | +\pnum |
| 632 | +Placeholder keywords are produced by preprocessing \keyword{import} |
| 633 | +and \keyword{module} directives. |
| 634 | +The \grammarterm{import-keyword} is produced |
| 635 | +by preprocessing an \keyword{import} directive\iref{cpp.import}, |
| 636 | +the \grammarterm{module-keyword} is produced |
| 637 | +by preprocessing a \keyword{module} directive\iref{cpp.module}, and |
| 638 | +the \grammarterm{export-keyword} is produced |
| 639 | +by preprocessing either of the previous two directives. |
| 640 | + |
| 641 | +\pnum |
| 642 | +\begin{note} |
| 643 | +Placeholder keywords do not have any observable spelling. |
| 644 | +\end{note} |
| 645 | +\indextext{keyword!placeholder|)}% |
| 646 | + |
631 | 647 | \rSec1[lex.header]{Header names}
|
632 | 648 |
|
633 | 649 | \indextext{header!name|(}%
|
|
960 | 976 | \begin{bnf}
|
961 | 977 | \nontermdef{keyword}\br
|
962 | 978 | \textnormal{any identifier listed in \tref{lex.key}}\br
|
963 |
| - \grammarterm{import-keyword}\br |
964 |
| - \grammarterm{module-keyword}\br |
965 |
| - \grammarterm{export-keyword} |
| 979 | + \grammarterm{placeholder-keyword} |
966 | 980 | \end{bnf}
|
967 | 981 |
|
968 | 982 | \pnum
|
|
0 commit comments