tmp/tmpv0_ms7e9/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### General <a id="uaxid.def.general">[[uaxid.def.general]]</a>
|
| 2 |
+
|
| 3 |
+
UAX \#31 specifies a default syntax for identifiers based on properties
|
| 4 |
+
from the Unicode Character Database, UAX \#44. The general syntax is
|
| 5 |
+
|
| 6 |
+
``` cpp
|
| 7 |
+
<Identifier> := <Start> <Continue>* (<Medial> <Continue>+)*
|
| 8 |
+
```
|
| 9 |
+
|
| 10 |
+
where `<Start>` has the XID_Start property, `<Continue>` has the
|
| 11 |
+
XID_Continue property, and `<Medial>` is a list of characters permitted
|
| 12 |
+
between continue characters. For C++ we add the character
|
| 13 |
+
U+005f (low line), or `_`, to the set of permitted `<Start>` characters,
|
| 14 |
+
the `<Medial>` set is empty, and the `<Continue>` characters are
|
| 15 |
+
unmodified. In the grammar used in UAX \#31, this is
|
| 16 |
+
|
| 17 |
+
``` cpp
|
| 18 |
+
<Identifier> := <Start> <Continue>*
|
| 19 |
+
<Start> := XID_Start + U+005f
|
| 20 |
+
<Continue> := <Start> + XID_Continue
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
This is described in the C++ grammar in [[lex.name]], where *identifier*
|
| 24 |
+
is formed from *identifier-start* or *identifier* followed by
|
| 25 |
+
*identifier-continue*.
|
| 26 |
+
|