tmp/tmpuz57668h/{from.md → to.md}
RENAMED
|
@@ -1,18 +1,24 @@
|
|
| 1 |
## Identifiers <a id="lex.name">[[lex.name]]</a>
|
| 2 |
|
| 3 |
``` bnf
|
| 4 |
identifier:
|
| 5 |
-
identifier-
|
| 6 |
-
identifier identifier-
|
| 7 |
-
identifier digit
|
| 8 |
```
|
| 9 |
|
| 10 |
``` bnf
|
| 11 |
-
identifier-
|
| 12 |
nondigit
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
```
|
| 15 |
|
| 16 |
``` bnf
|
| 17 |
nondigit: one of
|
| 18 |
'a b c d e f g h i j k l m'
|
|
@@ -24,51 +30,37 @@ nondigit: one of
|
|
| 24 |
``` bnf
|
| 25 |
digit: one of
|
| 26 |
'0 1 2 3 4 5 6 7 8 9'
|
| 27 |
```
|
| 28 |
|
| 29 |
-
|
| 30 |
-
Each *universal-character-name* in an identifier shall designate a
|
| 31 |
-
character whose encoding in ISO/IEC 10646 falls into one of the ranges
|
| 32 |
-
specified in [[lex.name.allowed]]. The initial element shall not be a
|
| 33 |
-
*universal-character-name* designating a character whose encoding falls
|
| 34 |
-
into one of the ranges specified in [[lex.name.disallowed]]. Upper- and
|
| 35 |
-
lower-case letters are different. All characters are significant.[^10]
|
| 36 |
|
| 37 |
-
|
|
|
|
| 38 |
|
| 39 |
-
|
| 40 |
-
| ------------- | ------------- | ------------- | ------------- | ------------- |
|
| 41 |
-
| `00A8` | `00AA` | `00AD` | `00AF` | `00B2-00B5` |
|
| 42 |
-
| `00B7-00BA` | `00BC-00BE` | `00C0-00D6` | `00D8-00F6` | `00F8-00FF` |
|
| 43 |
-
| `0100-167F` | `1681-180D` | `180F-1FFF` | | |
|
| 44 |
-
| `200B-200D` | `202A-202E` | `203F-2040` | `2054` | `2060-206F` |
|
| 45 |
-
| `2070-218F` | `2460-24FF` | `2776-2793` | `2C00-2DFF` | `2E80-2FFF` |
|
| 46 |
-
| `3004-3007` | `3021-302F` | `3031-D7FF` | | |
|
| 47 |
-
| `F900-FD3D` | `FD40-FDCF` | `FDF0-FE44` | `FE47-FFFD` | |
|
| 48 |
-
| `10000-1FFFD` | `20000-2FFFD` | `30000-3FFFD` | `40000-4FFFD` | `50000-5FFFD` |
|
| 49 |
-
| `60000-6FFFD` | `70000-7FFFD` | `80000-8FFFD` | `90000-9FFFD` | `A0000-AFFFD` |
|
| 50 |
-
| `B0000-BFFFD` | `C0000-CFFFD` | `D0000-DFFFD` | `E0000-EFFFD` | |
|
| 51 |
|
|
|
|
|
|
|
| 52 |
|
| 53 |
-
**
|
| 54 |
-
|
| 55 |
-
| | | | |
|
| 56 |
-
| ----------- | ---------------------------------------------- | ----------- | ----------- |
|
| 57 |
-
| `0300-036F` | % FIXME: Unicode v7 adds 1AB0-1AFF `1DC0-1DFF` | `20D0-20FF` | `FE20-FE2F` |
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
The identifiers in [[lex.name.special]] have a special meaning when
|
| 61 |
appearing in a certain context. When referred to in the grammar, these
|
| 62 |
identifiers are used explicitly rather than using the *identifier*
|
| 63 |
grammar production. Unless otherwise specified, any ambiguity as to
|
| 64 |
whether a given *identifier* has a special meaning is resolved to
|
| 65 |
interpret the token as a regular *identifier*.
|
| 66 |
|
| 67 |
-
In addition, some identifiers
|
| 68 |
-
|
| 69 |
-
required.
|
| 70 |
|
| 71 |
- Each identifier that contains a double underscore `__` or begins with
|
| 72 |
an underscore followed by an uppercase letter is reserved to the
|
| 73 |
implementation for any use.
|
| 74 |
- Each identifier that begins with an underscore is reserved to the
|
|
|
|
| 1 |
## Identifiers <a id="lex.name">[[lex.name]]</a>
|
| 2 |
|
| 3 |
``` bnf
|
| 4 |
identifier:
|
| 5 |
+
identifier-start
|
| 6 |
+
identifier identifier-continue
|
|
|
|
| 7 |
```
|
| 8 |
|
| 9 |
``` bnf
|
| 10 |
+
identifier-start:
|
| 11 |
nondigit
|
| 12 |
+
an element of the translation character set with the Unicode property XID_Start
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
``` bnf
|
| 16 |
+
identifier-continue:
|
| 17 |
+
digit
|
| 18 |
+
nondigit
|
| 19 |
+
an element of the translation character set with the Unicode property XID_Continue
|
| 20 |
```
|
| 21 |
|
| 22 |
``` bnf
|
| 23 |
nondigit: one of
|
| 24 |
'a b c d e f g h i j k l m'
|
|
|
|
| 30 |
``` bnf
|
| 31 |
digit: one of
|
| 32 |
'0 1 2 3 4 5 6 7 8 9'
|
| 33 |
```
|
| 34 |
|
| 35 |
+
[*Note 1*:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
+
The character properties XID_Start and XID_Continue are Derived Core
|
| 38 |
+
Properties as described by UAX \#44 of the Unicode Standard.[^7]
|
| 39 |
|
| 40 |
+
— *end note*]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
+
The program is ill-formed if an *identifier* does not conform to
|
| 43 |
+
Normalization Form C as specified in the Unicode Standard.
|
| 44 |
|
| 45 |
+
[*Note 2*: Identifiers are case-sensitive. — *end note*]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
+
[*Note 3*: In translation phase 4, *identifier* also includes those
|
| 48 |
+
*preprocessing-token*s [[lex.pptoken]] differentiated as keywords
|
| 49 |
+
[[lex.key]] in the later translation phase 7
|
| 50 |
+
[[lex.token]]. — *end note*]
|
| 51 |
|
| 52 |
The identifiers in [[lex.name.special]] have a special meaning when
|
| 53 |
appearing in a certain context. When referred to in the grammar, these
|
| 54 |
identifiers are used explicitly rather than using the *identifier*
|
| 55 |
grammar production. Unless otherwise specified, any ambiguity as to
|
| 56 |
whether a given *identifier* has a special meaning is resolved to
|
| 57 |
interpret the token as a regular *identifier*.
|
| 58 |
|
| 59 |
+
In addition, some identifiers appearing as a *token* or
|
| 60 |
+
*preprocessing-token* are reserved for use by C++ implementations and
|
| 61 |
+
shall not be used otherwise; no diagnostic is required.
|
| 62 |
|
| 63 |
- Each identifier that contains a double underscore `__` or begins with
|
| 64 |
an underscore followed by an uppercase letter is reserved to the
|
| 65 |
implementation for any use.
|
| 66 |
- Each identifier that begins with an underscore is reserved to the
|