Files
2025-10-25 03:02:53 +03:00

1.6 KiB

[uaxid.def.general]

Annex E (informative) Conformance with UAX #31 [uaxid]

E.2 R1 Default identifiers [uaxid.def]

E.2.1 General [uaxid.def.general]

1

#

UAX #31 specifies a default syntax for identifiers based on properties from the Unicode Character Database, UAX #44.

The general syntax is

<Identifier> := <Start> <Continue>* (<Medial> <Continue>+)*

where has the XID_Start property, has the XID_Continue property, and is a list of characters permitted between continue characters.

For C++ we add the character U+005f low line, or _, to the set of permitted characters, the set is empty, and the characters are unmodified.

In the grammar used in UAX #31, this is

<Identifier> := <Start> <Continue>*
<Start> := XID_Start + U+005f
<Continue> := <Start> + XID_Continue

2

#

This is described in the C++ grammar in [lex.name], where identifier is formed fromidentifier-start oridentifier followed by identifier-continue.