Init
This commit is contained in:
62
cppdraft/uaxid/def.md
Normal file
62
cppdraft/uaxid/def.md
Normal file
@@ -0,0 +1,62 @@
|
||||
[uaxid.def]
|
||||
|
||||
# Annex E (informative) Conformance with UAX #31 [[uaxid]](./#uaxid)
|
||||
|
||||
## E.2 R1 Default identifiers [uaxid.def]
|
||||
|
||||
### [E.2.1](#general) General [[uaxid.def.general]](uaxid.def.general)
|
||||
|
||||
[1](#general-1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L24)
|
||||
|
||||
UAX #31 specifies a default syntax for identifiers
|
||||
based on properties from the Unicode Character Database, UAX #44[.](#general-1.sentence-1)
|
||||
|
||||
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[.](#general-1.sentence-2)
|
||||
|
||||
For C++ we add the character U+005f low line, or _,
|
||||
to the set of permitted <Start> characters,
|
||||
the <Medial> set is empty, and
|
||||
the <Continue> characters are unmodified[.](#general-1.sentence-3)
|
||||
|
||||
In the grammar used in UAX #31, this is
|
||||
|
||||
```
|
||||
<Identifier> := <Start> <Continue>*
|
||||
<Start> := XID_Start + U+005f
|
||||
<Continue> := <Start> + XID_Continue
|
||||
|
||||
```
|
||||
|
||||
[2](#general-2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L45)
|
||||
|
||||
This is described in the C++ grammar in [[lex.name]](lex.name "5.11 Identifiers"),
|
||||
where [*identifier*](lex.name#nt:identifier "5.11 Identifiers [lex.name]") is formed from[*identifier-start*](lex.name#nt:identifier-start "5.11 Identifiers [lex.name]") or[*identifier*](lex.name#nt:identifier "5.11 Identifiers [lex.name]") followed by [*identifier-continue*](lex.name#nt:identifier-continue "5.11 Identifiers [lex.name]")[.](#general-2.sentence-1)
|
||||
|
||||
### [E.2.2](#stable) R1b Stable identifiers [[uaxid.def.stable]](uaxid.def.stable)
|
||||
|
||||
[1](#stable-1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L53)
|
||||
|
||||
An implementation of UAX #31 may choose to guarantee
|
||||
that identifiers are stable across versions of the Unicode Standard[.](#stable-1.sentence-1)
|
||||
|
||||
Once a string qualifies as an identifier it does so in all future versions[.](#stable-1.sentence-2)
|
||||
|
||||
[2](#stable-2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L58)
|
||||
|
||||
C++ does not make this guarantee,
|
||||
except to the extent that UAX #31 guarantees
|
||||
the stability of the XID_Start and XID_Continue properties[.](#stable-2.sentence-1)
|
||||
43
cppdraft/uaxid/def/general.md
Normal file
43
cppdraft/uaxid/def/general.md
Normal file
@@ -0,0 +1,43 @@
|
||||
[uaxid.def.general]
|
||||
|
||||
# Annex E (informative) Conformance with UAX #31 [[uaxid]](./#uaxid)
|
||||
|
||||
## E.2 R1 Default identifiers [[uaxid.def]](uaxid.def#general)
|
||||
|
||||
### E.2.1 General [uaxid.def.general]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L24)
|
||||
|
||||
UAX #31 specifies a default syntax for identifiers
|
||||
based on properties from the Unicode Character Database, UAX #44[.](#1.sentence-1)
|
||||
|
||||
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[.](#1.sentence-2)
|
||||
|
||||
For C++ we add the character U+005f low line, or _,
|
||||
to the set of permitted <Start> characters,
|
||||
the <Medial> set is empty, and
|
||||
the <Continue> characters are unmodified[.](#1.sentence-3)
|
||||
|
||||
In the grammar used in UAX #31, this is
|
||||
|
||||
```
|
||||
<Identifier> := <Start> <Continue>*
|
||||
<Start> := XID_Start + U+005f
|
||||
<Continue> := <Start> + XID_Continue
|
||||
|
||||
```
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L45)
|
||||
|
||||
This is described in the C++ grammar in [[lex.name]](lex.name "5.11 Identifiers"),
|
||||
where [*identifier*](lex.name#nt:identifier "5.11 Identifiers [lex.name]") is formed from[*identifier-start*](lex.name#nt:identifier-start "5.11 Identifiers [lex.name]") or[*identifier*](lex.name#nt:identifier "5.11 Identifiers [lex.name]") followed by [*identifier-continue*](lex.name#nt:identifier-continue "5.11 Identifiers [lex.name]")[.](#2.sentence-1)
|
||||
24
cppdraft/uaxid/def/stable.md
Normal file
24
cppdraft/uaxid/def/stable.md
Normal file
@@ -0,0 +1,24 @@
|
||||
[uaxid.def.stable]
|
||||
|
||||
# Annex E (informative) Conformance with UAX #31 [[uaxid]](./#uaxid)
|
||||
|
||||
## E.2 R1 Default identifiers [[uaxid.def]](uaxid.def#stable)
|
||||
|
||||
### E.2.2 R1b Stable identifiers [uaxid.def.stable]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L53)
|
||||
|
||||
An implementation of UAX #31 may choose to guarantee
|
||||
that identifiers are stable across versions of the Unicode Standard[.](#1.sentence-1)
|
||||
|
||||
Once a string qualifies as an identifier it does so in all future versions[.](#1.sentence-2)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L58)
|
||||
|
||||
C++ does not make this guarantee,
|
||||
except to the extent that UAX #31 guarantees
|
||||
the stability of the XID_Start and XID_Continue properties[.](#2.sentence-1)
|
||||
14
cppdraft/uaxid/eqci.md
Normal file
14
cppdraft/uaxid/eqci.md
Normal file
@@ -0,0 +1,14 @@
|
||||
[uaxid.eqci]
|
||||
|
||||
# Annex E (informative) Conformance with UAX #31 [[uaxid]](./#uaxid)
|
||||
|
||||
## E.6 R5 Equivalent case-insensitive identifiers [uaxid.eqci]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L100)
|
||||
|
||||
This document considers case to be significant in identifier comparison, and
|
||||
does not do any case folding[.](#1.sentence-1)
|
||||
|
||||
This requirement from UAX #31 does not apply to this document[.](#1.sentence-2)
|
||||
21
cppdraft/uaxid/eqn.md
Normal file
21
cppdraft/uaxid/eqn.md
Normal file
@@ -0,0 +1,21 @@
|
||||
[uaxid.eqn]
|
||||
|
||||
# Annex E (informative) Conformance with UAX #31 [[uaxid]](./#uaxid)
|
||||
|
||||
## E.5 R4 Equivalent normalized identifiers [uaxid.eqn]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L89)
|
||||
|
||||
UAX #31 requires that implementations describe
|
||||
how identifiers are compared and considered equivalent[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L93)
|
||||
|
||||
This document requires that identifiers be in Normalization Form C and
|
||||
therefore identifiers that compare the same under NFC are equivalent[.](#2.sentence-1)
|
||||
|
||||
This is described in [[lex.name]](lex.name "5.11 Identifiers")[.](#2.sentence-2)
|
||||
18
cppdraft/uaxid/filter.md
Normal file
18
cppdraft/uaxid/filter.md
Normal file
@@ -0,0 +1,18 @@
|
||||
[uaxid.filter]
|
||||
|
||||
# Annex E (informative) Conformance with UAX #31 [[uaxid]](./#uaxid)
|
||||
|
||||
## E.7 R6 Filtered normalized identifiers [uaxid.filter]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L107)
|
||||
|
||||
If any characters are excluded from normalization,
|
||||
UAX #31 requires a precise specification of those exclusions[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L111)
|
||||
|
||||
This document does not make any such exclusions[.](#2.sentence-1)
|
||||
12
cppdraft/uaxid/filterci.md
Normal file
12
cppdraft/uaxid/filterci.md
Normal file
@@ -0,0 +1,12 @@
|
||||
[uaxid.filterci]
|
||||
|
||||
# Annex E (informative) Conformance with UAX #31 [[uaxid]](./#uaxid)
|
||||
|
||||
## E.8 R7 Filtered case-insensitive identifiers [uaxid.filterci]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L116)
|
||||
|
||||
C++ identifiers are case sensitive, and
|
||||
therefore this requirement from UAX #31 does not apply[.](#1.sentence-1)
|
||||
22
cppdraft/uaxid/general.md
Normal file
22
cppdraft/uaxid/general.md
Normal file
@@ -0,0 +1,22 @@
|
||||
[uaxid.general]
|
||||
|
||||
# Annex E (informative) Conformance with UAX #31 [[uaxid]](./#uaxid)
|
||||
|
||||
## E.1 General [uaxid.general]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L6)
|
||||
|
||||
This Annex describes the choices made in application of
|
||||
UAX #31 (âUnicode Identifier and Pattern Syntaxâ)
|
||||
to C++ in terms of the requirements from UAX #31 and
|
||||
how they do or do not apply to this document[.](#1.sentence-1)
|
||||
|
||||
In terms of UAX #31,
|
||||
this document conforms by meeting the requirements
|
||||
R1 âDefault Identifiersâ and
|
||||
R4 âEquivalent Normalized Identifiersâ from UAX #31[.](#1.sentence-2)
|
||||
|
||||
The other requirements from UAX #31, also listed below,
|
||||
are either alternatives not taken or do not apply to this document[.](#1.sentence-3)
|
||||
11
cppdraft/uaxid/hashtag.md
Normal file
11
cppdraft/uaxid/hashtag.md
Normal file
@@ -0,0 +1,11 @@
|
||||
[uaxid.hashtag]
|
||||
|
||||
# Annex E (informative) Conformance with UAX #31 [[uaxid]](./#uaxid)
|
||||
|
||||
## E.9 R8 Hashtag identifiers [uaxid.hashtag]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L122)
|
||||
|
||||
There are no hashtags in C++, so this requirement from UAX #31 does not apply[.](#1.sentence-1)
|
||||
23
cppdraft/uaxid/immutable.md
Normal file
23
cppdraft/uaxid/immutable.md
Normal file
@@ -0,0 +1,23 @@
|
||||
[uaxid.immutable]
|
||||
|
||||
# Annex E (informative) Conformance with UAX #31 [[uaxid]](./#uaxid)
|
||||
|
||||
## E.3 R2 Immutable identifiers [uaxid.immutable]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L65)
|
||||
|
||||
An implementation may choose to guarantee that
|
||||
the set of identifiers will never change
|
||||
by fixing the set of code points allowed in identifiers forever[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L70)
|
||||
|
||||
C++ does not choose to make this guarantee[.](#2.sentence-1)
|
||||
|
||||
As scripts are added to Unicode,
|
||||
additional characters in those scripts may become available
|
||||
for use in identifiers[.](#2.sentence-2)
|
||||
20
cppdraft/uaxid/pattern.md
Normal file
20
cppdraft/uaxid/pattern.md
Normal file
@@ -0,0 +1,20 @@
|
||||
[uaxid.pattern]
|
||||
|
||||
# Annex E (informative) Conformance with UAX #31 [[uaxid]](./#uaxid)
|
||||
|
||||
## E.4 R3 Pattern_White_Space and Pattern_Syntax characters [uaxid.pattern]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L78)
|
||||
|
||||
UAX #31 describes how formal languages
|
||||
such as computer languages should describe and implement
|
||||
their use of whitespace and syntactically significant characters
|
||||
during the processes of lexing and parsing[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/uax31.tex#L84)
|
||||
|
||||
This document does not claim conformance with this requirement from UAX #31[.](#2.sentence-1)
|
||||
Reference in New Issue
Block a user