C++ Logo

SG16

Advanced search

Subject: Re: [isocpp-ext] P1949R4 - C++ Identifier Syntax using Unicode Standard Annex 31
From: Matthew Woehlke (mwoehlke.floss_at_[hidden])
Date: 2020-06-18 11:25:46


On 18/06/2020 11.23, Corentin Jabot wrote:
> I'm puzzled by your use case. How often do you use a regex to find
> identifiers?

Often, possibly as often as "daily". Certainly when I want to apply code
transformations.

> And which tools do that?

"Do that" is ambiguous, so I'll address both possibilities.

Q. What tools do I use to find idenifiers using regular expressions?
A. My text editor. Grep (both 'plain' and 'git grep').

Q. What tools use '[[:alnum:]]'¹ to detect identifiers?
A. My text editor (syntax highlighting). Source formatters. Really, the
short answer is "most code lexers aside from actual compilers".

(¹ Probably not as regular expressions, but rather via character by
character parsing using something like `isalnum`.)

-- 
Matthew

SG16 list run by sg16-owner@lists.isocpp.org