Annex E

(informative)

Conformance with UAX #31 [uaxid]

E.2 R1 Default identifiers [uaxid.def]

E.2.1 General [uaxid.def.general]

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 <Start> has the XID_Start property, <Continue> has the XID_Continue property, and <Medial> is a list of characters permitted between continue characters.
UAX #31 also specifies some standard profiles, including the Mathematical Compatibility Notation profile.
For C++ we apply the Mathematical Compatibility Notation profile, and we add the character U+005f low line, or _, to the set of permitted <Start> characters.
The <Medial> set is empty.
In the grammar used in UAX #31, this is
<Identifier> := <Start> <Continue>*
<Start> := XID_Start + ID_Compat_Math_Start + U+005f
<Continue> := <Start> + XID_Continue + ID_Compat_Math_Continue
This is described in the C++ grammar in [lex.name], where identifier is formed from identifier-start or identifier followed by identifier-continue.