C++ Logo


Advanced search

Re: [wg14/wg21 liaison] (SC22WG14.19303) adding punctuator tokens

From: Jens Maurer <Jens.Maurer_at_[hidden]>
Date: Sat, 17 Apr 2021 18:57:48 +0200
On 17/04/2021 11.36, Jens Gustedt wrote:
> Jens,
> on Sat, 17 Apr 2021 10:02:15 +0200 you (Jens Maurer
> <Jens.Maurer_at_[hidden]>) wrote:

>> The paper is here:
>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1949r6.html
>> The pp-number change in particular is just applying the new
>> UAX#31-based lexing grammar non-terminals to these. Nothing to see,
>> I believe.
> ah, ok. So I guess the intent of this change is to allow such letters
> in application defined number and string suffixes? That would be
> reasonable also to have for C, I think.

The current lexing of pp-number is the same between C and C++;
modulo digit separators in C++. See C2x 6.4.8 and C++20 5.9.

Both languages say that 0abcdz\u4000xx is a pp-number.
Since a universal-character-name may appear there, we should
say that only identifier-allowed ones can appear there.
(This decision primarily affects lexing of the next
token, which might be an "identifier". Essentially, this says
that you need to put whitespace in between.)


Received on 2021-04-17 11:57:56