This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See for the official list.


1901. punctuator referenced but not defined

Section: 5.6  [lex.token]     Status: drafting     Submitter: Richard Smith     Date: 2014-03-25

The syntactic nonterminal punctuator appears in the grammar for token in 5.6 [lex.token], but it is nowhere defined. It should be merged with operator and given an appropriate list of tokens as a definition for the merged term.

Proposed resolution (October, 2017):

  1. Change 5.5 [lex.digraph] paragraph 2 as follows

  2. In all respects of the language except in an attribute-token (9.12.1 [dcl.attr.grammar]), each alternative token behaves the same, respectively, as its primary token, except for its spelling.18 The set of alternative tokens...
  3. Change the grammar in 5.6 [lex.token] as follows:

  4. Change 5.6 [lex.token] paragraph 1 as follows:

  5. There are five four kinds of tokens: identifiers, keywords, literals,19 operators, and other separators and symbols. Blanks, horizontal and vertical tabs, newlines, formfeeds, and comments (collectively, “white space”), as described below, are ignored except as they serve to separate tokens. [Note: Some white space is required to separate otherwise adjacent identifiers, keywords, numeric literals, and alternative tokens containing alphabetic characters. —end note] Each preprocessing-token resulting from translation phase 6 is converted into the corresponding token as follows:

    [Note: Within an attribute-token (9.12.1 [dcl.attr.grammar]), a token formed from a preprocessing-token that satisfies the syntactic requirements of an identifier is considered to be an identifier with the spelling of the preprocessing-token. —end note]

  6. Delete the final sentence of 5.12 [lex.operators] paragraph 1.

  7. Each preprocessing-op-or-punc is converted to a single token in translation phase 7 (5.2 [lex.phases]).