CVS difference for ais/ai-00395.txt

Differences between 1.6 and version 1.7
Log of other versions for file ais/ai-00395.txt

--- ais/ai-00395.txt	2005/02/10 05:46:41	1.6
+++ ais/ai-00395.txt	2005/04/13 05:37:20	1.7
@@ -1,13 +1,30 @@
-!standard 2.1(14.2/2)                                  05-02-07  AI95-00395/04
-!standard 1.1.4(14.1/2)
-!standard 2.3(1.1/2)
-!standard 2.3(5.2/2)
-!standard 2.9(2)
-!standard 3.5.2(3.2/2)
-!standard 4.1.4(3)
-!standard 4.1.4(5)
-!standard A.4.8(1)
+!standard 1.1.4(15)                                  05-02-28  AI95-00395/05
+!standard 2.1(01)
+!standard 2.1(03)
+!standard 2.1(04)
+!standard 2.1(14)
+!standard 2.3(02)
+!standard 2.3(03)
+!standard 2.3(04)
+!standard 2.3(05)
+!standard 2.3(06)
+!standard 2.9(02)
+!standard 3.5.2(03)
+!standard 6.1(10)
+!standard A.1(36)
+!standard A.3.1(00)
+!standard A.3.1(02)
+!standard A.3.2(02)
+!standard A.3.2(13)
+!standard A.3.2(42-48)
+!standard A.3.4(01)
+!standard A.4.7(46)
+!standard A.4.7(48)
+!standard A.4.8(01)
+!standard J.14(00)
 !class amendment 05-01-25
+!comment This is in the Amendment (AARM), but not yet approved.
+!status Amendment 200Y 05-02-25
 !status work item 05-01-25
 !status received 05-01-25
 !priority High
@@ -62,7 +79,9 @@
 1 - After removing the other_format characters, an identifier must not violate
 the "usual" rules about underlines. It must not be a reserved word, either.
 Also, other_format characters are allowed (but ignored) in reserved words, and
-in "special" attribute designators.
+in "special" attribute designators. Note that we must phrase the wording to
+only allow ASCII characters in identifiers, to avoid oddities like "if" written
+with a Turkish dotless-i, or "access" written with a German sharp-s.
 
 2 - The incompatibility doesn't seem justified. While Unicode recommends that
 other_format characters be ignored in identifiers, it doesn't say anything about
@@ -73,7 +92,10 @@
 far, in particular we do not want to allow control characters. They have been
 disallowed for 20 years, and there is no indication that users have had any
 problem with that. We are just avoiding an incompatibility. We must also
-specify what is the effect of the other_format character in operator names.
+specify what is the effect of other_format characters in operator symbols. We
+are following the rule that other_format characters work in operator symbols
+just like in normal text: they are allowed (and ignored) for operators that are
+reserved words, and disallowed in other operators.
 
 3 - We are not going to fix all these places. Currently we only have a rule in
 2.3, but it surely doesn't cover all the occurrences of "upper case", so it
@@ -82,8 +104,9 @@
 4 - Change the language-defined names to keep the current value of Width (which
 is 12).
 
-5 - Add Ada.Strings.Hash and Ada.Strings.Unbounded.Hash to A.4.8's list of
-packages. Add A.4.7(46.1/2) to A.4.8.
+5 - Add Ada.Strings.Wide_Wide_Hash and
+Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Hash to A.4.8's list of functions.
+Add A.4.7(46.1/2) to A.4.8.
 
 6 - Ada.Strings.Wide_Maps.Wide_Constants defines Upper_Case_Map and
 Lower_Case_Map in terms of Ada.Strings.Maps.Constants. A.4.7(48) makes it clear
@@ -98,41 +121,38 @@
 Covering the full range seems inconsistent with Wide_Maps. Case folding is not
 necessarily 1-to-1; therefore, these mappings are inappropriate for 32-bit
 characters anyway. Therefore, we stay consistent with Wide_Constants and
-add the Note to A.4.8.
+add text to A.4.8. This text should be normative, and A.4.7 should be changed
+similarly.
 
-[Editor's note: Robert Dewar has suggested that these notes need to be
-normative now, because we are now defining case conversion rules for the
-entire character set. I tend to agree.]
-
 7 - There are two ways to fix this issue: add a size clause for 32 bits; or add
-another 2**31 literals to Wide_Character.  The former has the drawback that some
-operations involving low-level programming (Unchecked_Conversion, C interfacing)
-may become erroneous.  The latter has the drawback that Wide_Wide_Character does
-not model properly the 10646 character set, and therefore programmers who care
-about internationalization have to deal with the 2**31 extra values; in
-particular, a signed integer type on a 32-bit machine cannot hold the Pos of a
-Wide_Wide_Character.  This AI was written for the first option.
-
-8 - Add wording to cover positions 16#FFFE# and 16#FFFF# of each plane.  Note
-that while the characters at positions 16#0000FFFE# and 16#0000FFFF# have the
-language-defined names FFFE and FFFF, the other "forbidden" characters don't
-have special language-defined names.
+another 2**31 literals to Wide_Wide_Character. The former has the drawback
+that some operations involving low-level programming (Unchecked_Conversion, C
+interfacing) may become erroneous. The latter has the drawback that
+Wide_Wide_Character does not model properly the 10646 character set, and
+therefore programmers who care about internationalization have to deal with the
+2**31 extra values; in particular, a signed integer type on a 32-bit machine
+cannot hold the Pos of a Wide_Wide_Character. This AI was written for the
+first option.
+
+8 - Add wording to cover positions 16#FFFE# and 16#FFFF# of each plane.  We are
+also removing the language-defined names FFFE and FFFF.
 
 9 - Full case mapping and wide character categorization requires hefty
 run-time tables, so it would be inappropriate to add that to
-Ada.Characters.Handling. Therefore, we would need to add
-Ada.Wide_Characters.Handling and Ada.Wide_Wide_Characters.Handling. It
-seems too late to do this. [Editor's note: I don't feel that way; packages
-are relatively easy to define, and errors are unlikely to cause trouble
-elsewhere. Also, Characters.Handling is incompatible because new overloading
-make use of literals ambigious; these routines could be moved and the
-incompatibility eliminated.]
+Ada.Characters.Handling. However, the addition of new operations dealing with
+Wide_Wide_Characters in Ada.Characters.Handling is problematic, as it makes
+some calls (those that use literals) ambiguous. So we are moving the conversion
+functions in a new child package, Ada.Characters.Conversions, and making the
+existing conversion functions in Ada.Characters.Handling obsolete. We are also
+adding packages Ada.Wide_Characters and Ada.Wide_wide_Characters as umbrellas
+for implementation- defined (or user-defined) operation on Wide_ and
+Wide_Wide_Characters and Strings.
 
 !wording
 
 1 -
 
-Change 2.3(1.1/2-4) to read:
+Change 2.3(2-4) to read:
 
     identifier ::= identifier_start {identifier_start | identifier_extend}
     identifier_start ::= letter_uppercase |
@@ -150,34 +170,22 @@
 After eliminating the characters in category other_format, an identifier shall
 not contain two consecutive characters in category punctuation_connector, or end
 with a character in that category.
-
-Add after 2.3(5.2/2):
-
-After applying these transformations, an identifier shall not be identical to
-[the upper case version of] a reserved word.
 
-Replace 2.9(2/2) with:
+Add before 2.3(6):
 
-    reserved_word ::= identifier_start {identifier_start | other_format}
+After applying these transformations, an identifier shall not be identical to a
+reserved word (in upper case).
 
-After eliminating the characters in category other_format and converting the
-remaining sequence of characters to upper case, a *reserved word* shall be
-identical to the upper case version of one of the following words:
+Replace the introductory sentence of 2.9(2) with:
 
-Replace 4.1.4(3) with:
+The following are the reserved words. Within a program, some or all of the
+letters of a reserved word may be in upper case, and one or more characters in
+category other_format may be inserted within or at the end of the reserved word.
 
-    attribute_designator ::=
-       identifier [(static_expression)] | reserved_word
 
-Add after 4.1.4(5):
-
-A reserved word used as an attribute_designator shall be one of Access, Delta,
-or Digits.
-
-
 2 -
 
-Change 2.1(14/2) to read:
+Change 2.1(14) (as modified by AI95-00285) to read:
 
 graphic_character
    Any character which is not in the categories other_control,
@@ -187,61 +195,72 @@
 Change 6.1(10) to read:
 
 The sequence of characters in an operator_symbol shall be identical, after
-conversion to upper case, to the upper case version of the sequence of
-characters for one the six classes of operators defined in 4.5 (spaces and
-characters in category other_format are not allowed).
+conversion to upper case, to the sequence of characters for one the six classes
+of operators defined in 4.5 (in upper case). Spaces are not allowed. One or
+more characters in category other_format may be inserted after any
+graphic_character in the operator_symbol if the operator_symbol is a reserved
+word.
+
+AARM Note: The rule about other_format characters is intended to match the one
+that applies to normal occurrences of the operators: they are allowed (and
+ignored) in reserved words, and disallowed in compound delimiters or after or
+before an operator symbol.
 
 
 3 -
 
-Add after 1.1.4(14.1/2):
+Add before 1.1.4(15):
 
-When this International Standard mentions the upper case version of some
-character or sequence of characters, it means the character or sequence of
+When this International Standard mentions the conversion of some character or
+sequence of characters to upper case, it means the character or sequence of
 characters obtained by using locale-independent full case folding, as defined by
 documents referenced in the note in section 1 of ISO/IEC 10646:2003.
 
 AARM Note: For sequences of characters, case folding is applied to the sequence,
-not to individual characters. It can make a difference, sometimes.
+not to individual characters. It sometimes can make a difference.
 
-Change 2.3(5.2/2) to read:
+Change the second paragraph added after 2.3(5) by AI95-00285 to read:
 
 o The remaining sequence of characters is converted to upper case.
 
 
 4 -
 
-In 3.5.2(3.2/2), replace:
+In the second paragraph added after 3.5.2(3) by AI95-00285, replace:
 
 ... the string "Character_" ...
 
 by:
 
-... the string "Chr_" ...
+... the string "Hex_" ...
 
 
 5 -
+
+In A.4.8(1) (introduced by AI95-00285), add Strings.Wide_Wide_Hash
+and Strings.Wide_Wide_Unbounded.Wide_Wide_Hash functions.
 
-In A.4.8(1/2), add Wide_Wide_Strings.Wide_Wide_Hash and
-Strings.Wide_Wide_Unbounded.Wide_Wide_Hash packages.
+In A.4.8(28) (introduced by AI95-00285), add Strings.Hash and
+Strings.Unbounded.Hash functions.
 
-In A.4.8(28/2), add Strings.Hash and Strings.Unbounded.Hash packages.
+Add after A.4.8(45) (introduced by AI95-00285):
 
-Add after A.4.8(45/2):
 Pragma Pure is replaced by pragma Preelaborate in
 Strings.Wide_Wide_Maps.Wide_Wide_Constants.
 
 
 6 -
 
-Add a note to A.4.8:
+Change A.4.7(48) into normative text.
 
+Add at the end of A.4.8 (introduced by AI95-00302):
+
 Each Wide_Wide_Character_Set constant in the package
 Strings.Wide_Wide_Maps.Wide_Wide_Constants contains no values outside the
-Character portion of Wide_Wide_Character. Similarly, each Wide_Wide_Character_Mapping
+Character portion of Wide_Wide_Character. Similarly, each
+Wide_Wide_Character_Mapping
 constant in this package is the identity mapping when applied to any element
-outside the Character portion of Wide_Wide_Character. Use
-Ada.Characters.Wide_Wide_Handling to do more general case mapping.
+outside the Character portion of Wide_Wide_Character.
 
 
 7 -
@@ -253,44 +272,776 @@
 
 8 -
 
-Change 2.1(1/2) to read:
+Change 2.1(1) (as modified by AI95-00285) to read:
 
 The character repertoire for the text of an Ada program consists of the
 collection of characters described by the ISO/IEC 10646:2003 Universal Multiple-
-Octet Coded Character Set.  This collection is organized in *planes*, each
-plane  comprising 65536 characters.
+Octet Coded Character Set. This collection is organized in *planes*, each
+plane comprising 65536 characters.
 
-Change 2.1(3.1/2) to read:
+Change the paragraph inserted after 2.1(3) by AI95-00285 to read:
 
 A character is any character defined within ISO/IEC 10646:2003 other than those
-whose code position is 16#FFFE# or 16#FFFF# in each plane.
+whose relative code position in their plane is 16#FFFE# or 16#FFFF#.
 
-Change the second sentence of 2.1(4/2) to read:
+Change the second sentence of 2.1(4) (as modified by AI95-00285) to read:
 
-The characters whose code position is 16#FFFE# or 16#FFFF# in each plane are
-not  allowed anywhere in the text of a program.
+A character whose relative code position in its plane is 16#FFFE# or 16#FFFF#
+is not allowed anywhere in the text of a program.
 
-Change 2.1(14/2) to read (that's in addition to the changes for this paragraph
+Change 2.1(14) to read (that's in addition to the changes for this paragraph
 above):
 
 graphic_character
    Any character which is not in the categories other_control,
-other_private_use, other_surrogate, format_effector, and whose code
-position is neither 16#FFFE# nor 16#FFFF# in any plane.
+other_private_use, other_surrogate, format_effector, and whose relative code
+position in its plane is neither 16#FFFE# nor 16#FFFF#.
+
+In 3.5.2(3), remove:
+
+"The last 2 values of Wide_Character correspond to the nongraphic positions FFFE
+and FFFF of the BMP, and are assigned the language-defined names FFFE and FFFF.
+As with the other language-defined names for nongraphic characters, the names
+FFFE and FFFF are usable only with the attributes (Wide_)Image and (Wide_)Value;
+they are not usable as enumeration literals."
 
+In A.1(36) replace:
 
+   type Wide_Character is (nul, soh, ..., Hex_0000FFFF);
+
+
 9 -
+
+Change A.3.1(0) to read:
+
+A.3.1 The Packages Characters, Wide_Characters, and Wide_Wide_Characters
+
+Insert after A.3.1(2):
+
+The library package Wide_Characters has the following declaration:
+
+package Ada.Wide_Characters is
+   pragma Pure (Wide_Characters);
+end Ada.Wide_Characters;
+
+The library package Wide_Wide_Characters has the following declaration:
+
+package Ada.Wide_Wide_Characters is
+   pragma Pure (Wide_Wide_Characters);
+end Ada.Wide_Wide_Characters;
+
+Implementation Advice
+
+If an implementation chooses to provide implementation defined operations on Wide_Character or Wide_String (such as case mapping, classification, collating and sorting, etc.) it should do so by providing child units of Ada.Wide_Characters.  Similarly if i
t chooses to provide implementation defined operations on Wide_Wide_Character or Wide_Wide_String it should do so by providing child units of Ada.Wide_Wide_Characters.
+
+Add before A.3.2(2):
+
+with Ada.Characters.Conversions
+
+Replace A.3.2(13) by:
+
+  -- The following six functions are obsolescent; see J.14.
+
+Delete A.3.2(42-48).
+
+Add section J.14:
 
-We're not defining anything for this question.
+J.14 Character and Wide_Character Conversion Functions
 
+The following declarations exist in the declaration of package
+Ada.Characters.Handling:
+
+   function Is_Character (Item : in Wide_Character) return Boolean
+      renames Conversions.Is_Character;
+   function Is_String    (Item : in Wide_String)    return Boolean
+      renames Conversions.Is_String;
+
+   function To_Character (Item       : in Wide_Character;
+                         Substitute : in Character := ' ')
+                         return Character
+      renames Conversions.To_Character;
+
+   function To_String    (Item       : in Wide_String;
+                          Substitute : in Character := ' ')
+                          return String
+      renames Conversions.To_String;
+
+   function To_Wide_Character (Item : in Character) return Wide_Character
+      renames Conversions.To_Wide_Character;
+
+   function To_Wide_String    (Item : in String)    return Wide_String
+      renames Conversions.To_Wide_String;
+
+Add section A.3.4:
+
+A.3.4 The Package Characters.Conversions
+
+The library package Ada.Characters.Conversions has the following declaration:
+
+package Ada.Characters.Conversions is
+   pragma Pure (Conversions);
+
+   function Is_Character (Item : in Wide_Character)      return Boolean;
+   function Is_String    (Item : in Wide_String)         return Boolean;
+   function Is_Character (Item : in Wide_Wide_Character) return Boolean;
+   function Is_String    (Item : in Wide_Wide_String)    return Boolean;
+   function Is_Wide_Character (Item : in Wide_Wide_Character) return Boolean;
+   function Is_Wide_String    (Item : in Wide_Wide_String)    return Boolean;
+
+   function To_Wide_Character (Item : in Character) return Wide_Character;
+   function To_Wide_String    (Item : in String)    return Wide_String;
+   function To_Wide_Wide_Character (Item : in Character) return
+Wide_Wide_Character;
+   function To_Wide_Wide_String    (Item : in String) return Wide_Wide_String;
+   function To_Wide_Wide_Character (Item : in Wide_Character) return
+Wide_Wide_Character;
+   function To_Wide_Wide_String    (Item : in Wide_String) return
+Wide_Wide_String;
+
+   function To_Character (Item       : in Wide_Character;
+                         Substitute : in Character := ' ') return Character;
+   function To_String    (Item       : in Wide_String;
+                          Substitute : in Character := ' ') return String;
+   function To_Character (Item :       in Wide_Wide_Character;
+                          Substitute : in Character := ' ') return Character;
+   function To_String    (Item :       in Wide_Wide_String;
+                          Substitute : in Character := ' ') return String;
+   function To_Wide_Character (Item :       in Wide_Wide_Character;
+                               Substitute : in Wide_Character := ' ') return
+Wide_Character;
+   function To_Wide_String    (Item :       in Wide_Wide_String;
+                               Substitute : in Wide_Character := ' ') return
+Wide_String;
+
+end Ada.Characters.Conversions;
+
+(The wording for the semantics of the operations declared in this package is
+identical to the one currently in AI95-00285.)
+
 !discussion
 
 (See proposal.)
 
 !example
 
+!corrigendum 1.1.4(15)
+
+@dinsb
+A @i<syntactic category> is a nonterminal in the grammar defined in BNF under
+"Syntax." Names of syntactic categories are set in a different font,
+@fa<like_this>.
+@dinst
+When this International Standard mentions the conversion of some character or
+sequence of characters to upper case, it means the character or sequence of
+characters obtained by using locale-independent full case folding, as defined
+by documents referenced in the note in section 1 of ISO/IEC 10646:2003.
+
+!corrigendum 2.1(01)
+
+@drepl
+The only characters allowed outside of @fa<comment>s are the
+@fa<graphic_character>s and @fa<format_effector>s.
+@dby
+The character repertoire for the text of an Ada program consists of the
+collection of characters described by the ISO/IEC 10646:2003 Universal
+Multiple-Octet Coded Character Set. This collection is organized in @i<planes>,
+each plane comprising 65536 characters.
+
+!corrigendum 2.1(03)
+
+@drepl
+@xcode<@fa<graphic_character ::= identifier_letter | digit | space_character | special_character>>
+@dby
+@xindent<A @fa<character> is any character defined within ISO/IEC 10646:2003
+other than those whose relative code position in their plane is 16#FFFE# or
+16#FFFF#.>
+
+!corrigendum 2.1(04)
+
+@drepl
+The character repertoire for the text of an Ada program consists of the
+collection of characters called the Basic Multilingual Plane (BMP) of the ISO
+10646 Universal Multiple-Octet Coded Character Set, plus a set of
+@fa<format_effector>s and, in comments only, a set of
+@fa<other_control_function>s; the coded representation for these characters is
+implementation defined (it need not be a representation defined within
+ISO-10646-1).
+@dby
+The coded representation for characters is implementation defined (it need not
+be a representation defined within ISO/IEC 10646:2003). A character whose
+relative code position in its plane is 16#FFFE# or 16#FFFF# is not allowed
+anywhere in the text of a program.
+
+The semantics of an Ada program whose text is not in Normalization Form KC (as
+defined by section 24 of ISO/IEC 10646:2003) is implementation defined.
+
+!corrigendum 2.1(14)
+
+@drepl
+@xhang<@xterm<@fa<other_control_function>>
+Any control function, other than a @fa<format_effector>, that is allowed in a
+comment; the set of @fa<other_control_function>s allowed in comments is
+implementation defined.>
+@dby
+@xhang<@xterm<@fa<graphic_character>>
+Any character which is not in the categories @fa<other_control>,
+@fa<other_private_use>, @fa<other_surrogate>, @fa<format_effector>, and whose
+relative code position in its plane is neither 16#FFFE# nor 16#FFFF#.>
+
+!corrigendum 2.3(02)
+
+@drepl
+@xcode<@fa<identifier ::=
+   identifier_letter {[underline] letter_or_digit}>>
+@dby
+@xcode<@fa<identifier ::=
+   identifier_start {identifier_start | identifier_extend}>>
+
+!corrigendum 2.3(03)
+
+@drepl
+@xcode<@fa<letter_or_digit ::= identifier_letter | digit>>
+@dby
+@xcode<@fa<identifier_start ::=
+     letter_uppercase
+   | letter_lowercase
+   | letter_titlecase
+   | letter_modifier
+   | letter_other
+   | number_letter>>
+@xcode<@fa<identifier_extend ::=
+     mark_non_spacing
+   | mark_spacing_combining
+   | number_decimal_digit
+   | punctuation_connector
+   | other_format>>
+
+!corrigendum 2.3(04)
+
+@drepl
+An identifier shall not be a reserved word.
+@dby
+After eliminating the characters in category @fa<other_format>, an identifier
+shall not contain two consecutive characters in category punctuation_connector,
+or end with a character in that category.
+
+!corrigendum 2.3(05)
+
+@drepl
+All characters of an @fa<identifier> are significant, including any underline
+character. @fa<Identifier>s differing only in the use of corresponding upper
+and lower case letters are considered the same.
+@dby
+Two @fa<identifier>s are considered the same if they consist of the same
+sequence of characters after applying the following transformations (in
+this order):
+
+@xbullet<The characters in category @fa<other_format> are eliminated.>
+
+@xbullet<The remaining sequence of characters is converted to upper case.>
+
+!corrigendum 2.3(06)
+
+@dinsb
+In a nonstandard mode, an implementation may support other upper/lower case
+equivalence rules for identifiers, to accommodate local conventions.
+@dinst
+After applying these transformations, an identifier shall not be identical to a
+reserved word (in upper case).
+
+!corrigendum 2.9(02)
+
+@dprepl
+The following are the reserved words (ignoring upper/lower case distinctions):
+@dby
+The following are the reserved words. Within a program, some or all of the
+letters of a reserved word may be in upper case, and one or more characters in
+category @fa<other_format> may be inserted within or at the end of the reserved
+word.
+
+!corrigendum 3.5.2(03)
+
+@drepl
+The predefined type Wide_Character is a character type whose values correspond
+to the 65536 code positions of the ISO 10646 Basic Multilingual Plane (BMP).
+Each of the graphic characters of the BMP has a corresponding
+@fa<character_literal> in Wide_Character. The first 256 values of
+Wide_Character have the same @fa<character_literal> or language-defined name as
+defined for Character. The last 2 values of Wide_Character correspond to the
+nongraphic positions FFFE and FFFF of the BMP, and are assigned the
+language-defined names @i<FFFE> and @i<FFFF>. As with the other
+language-defined names for nongraphic characters, the names @i<FFFE> and
+@i<FFFF> are usable only with the attributes (Wide_)Image and (Wide_)Value;
+they are not usable as enumeration literals. All other values of Wide_Character
+are considered graphic characters, and have a corresponding
+@fa<character_literal>.
+@dby
+The predefined type Wide_Character is a character type whose values correspond
+to the 65536 code positions of the ISO/IEC 10646:2003 Basic Multilingual Plane
+(BMP). Each of the graphic characters of the BMP has a corresponding
+@fa<character_literal> in Wide_Character. The first 256 values of
+Wide_Character have the same @fa<character_literal> or language-defined name as
+defined for Character. Each of the @fa<graphic_character>s has a corresponding
+@fa<character_literal>.
+
+The predefined type Wide_Wide_Character is a character type whose values
+correspond to the 2147483648 code positions of the ISO/IEC 10646:2003 character
+set. Each of the @fa<graphic_character>s has a corresponding
+@fa<character_literal> in Wide_Wide_Character. The first 65536 values of
+Wide_Wide_Character have the same @fa<character_literal> or language-defined
+name as defined for Wide_Character.
+
+The characters whose code position is larger than 16#FF# and which are not
+@fa<graphic_character>s have language-defined names which are formed by
+appending to the string "Hex_" the representation of their code position in
+hexadecimal as eight extended digits. As with other language-defined names,
+these names are usable only with the attributes (Wide_)Wide_Image and
+(Wide_)Wide_Value; they are not usable as enumeration literals.
+
+!corrigendum 6.1(10)
+
+@drepl
+The sequence of characters in an @fa<operator_symbol> shall correspond to an
+operator belonging to one of the six classes of operators defined in clause 4.5
+(spaces are not allowed and the case of letters is not significant).
+@dby
+The sequence of characters in an @fa<operator_symbol> shall be identical, after
+conversion to upper case, to the sequence of characters for one the six classes
+of operators defined in 4.5 (in upper case). Spaces are not allowed. One or
+more characters in category @fa<other_format> may be inserted after any
+@fa<graphic_character> in the @fa<operator_symbol> if the @fa<operator_symbol>
+is a reserved word.
+
+!corrigendum A.1(36)
+
+@drepl
+@xcode<   -- @ft<@i<The predefined operators for the type Character are the same as for>>
+   -- @ft<@i<any enumeration type.>>
+
+   -- @ft<@i<The declaration of type Wide_Character is based on the standard ISO 10646 BMP character set.>>
+   -- @ft<@i<The first 256 positions have the same contents as type Character. See 3.5.2.>>
+
+   @b<type> Wide_Character @b<is> (@i<nul>, @i<soh> ... @i<FFFE>, @i<FFFF>);
+
+   @b<package> ASCII @b<is> ... @b<end> ASCII;  --@ft<@i<Obsolescent; see J.5>>>
+@dby
+@xcode<   -- @ft<@i<The predefined operators for the type Character are the same as for>>
+   -- @ft<@i<any enumeration type.>>
+
+   -- @ft<@i<The declaration of type Wide_Character is based on the standard ISO/IEC 10646:2003 BMP character set.>>
+   -- @ft<@i<The first 256 positions have the same contents as type Character. See 3.5.2.>>
+
+   @b<type> Wide_Character @b<is> (@i<nul>, @i<soh> ... @i<Hex_0000FFFE>, @i<Hex_0000FFFF>);
+
+   -- @ft<@i<The declaration of type Wide_Wide_Character is based on the full>>
+   -- @ft<@i<ISO/IEC 10646:2003 character set. The first 65536 positions have the>>
+   -- @ft<@i<same contents as type Wide_Character. See 3.5.2.>>
+
+   @b<type> Wide_Wide_Character @b<is> (@i<nul>, @i<soh> ... @i<Hex_7FFFFFFE>, @i<Hex_7FFFFFFF>);
+   @b<for> Wide_Wide_Character'Size @b<use> 32;
+
+   @b<package> ASCII @b<is> ... @b<end> ASCII;  --@ft<@i<Obsolescent; see J.5>>>
+
+!corrigendum A.3.1(00)
+
+@drepl
+The Package Characters
+@dby
+The Packages Characters, Wide_Characters and Wide_Wide_Characters
+
+!corrigendum A.3.1(02)
+
+@dinsa
+@xcode<@b<package> Ada.Characters @b<is>
+   @b<pragma> Pure (Characters);
+@b<end> Ada.Characters;>
+@dinss
+The library package Wide_Characters has the following declaration:
+
+@xcode<@b<package> Ada.Wide_Characters @b<is>
+   @b<pragma> Pure (Wide_Characters);
+@b<end> Ada.Wide_Characters;>
+
+The library package Wide_Wide_Characters has the following declaration:
+
+@xcode<@b<package> Ada.Wide_Wide_Characters @b<is>
+   @b<pragma> Pure (Wide_Wide_Characters);
+@b<end> Ada.Wide_Wide_Characters;>
+
+@i<@s8<Implementation Advice>>
+
+If an implementation chooses to provide implementation defined operations on
+Wide_Character or Wide_String (such as case mapping, classification, collating
+and sorting, etc.) it should do so by providing child units of
+Ada.Wide_Characters. Similarly if it chooses to provide implementation defined
+operations on Wide_Wide_Character or Wide_Wide_String it should do so by
+providing child units of Ada.Wide_Wide_Characters.
+
+!corrigendum A.3.2(02)
+
+@drepl
+@xcode<@b<package> Ada.Characters.Handling @b<is>
+   @b<pragma> Preelaborate(Handling);>
+@dby
+@xcode<@b<with> Ada.Characters.Conversions;
+@b<package> Ada.Characters.Handling @b<is>
+   @b<pragma> Pure(Handling);>
+
+!corrigendum A.3.2(13)
+
+@drepl
+@xcode<  --@ft<@i<Classifications of and conversions between Wide_Character and Character.>>>
+@dby
+@xcode<  --@ft<@i< The following six functions are obsolescent; see J.14.>>>
+
+!corrigendum A.3.2(42)
+
+@ddel
+The following set of functions test Wide_Character values for membership in
+Character, or convert between corresponding characters of Wide_Character and
+Character.
+
+!comment A.3.2(43-47) are deleted by the original AI-285, so no change is needed here.
+
+!corrigendum A.3.2(48)
+
+@ddel
+@xhang<@xterm<To_Wide_String
+Returns the Wide_String whose range is 1..Item'Length and each of whose
+elements is given by To_Wide_Character of the corresponding element in Item.>
+
+!corrigendum A.3.4(01)
+
+@dinsc
+The library package Ada.Characters.Conversions has the following declaration:
+
+@xcode<@b<package> Ada.Characters.Conversions @b<is>
+   @b<pragma> Pure (Conversions);
+
+   @b<function> Is_Character (Item : @b<in> Wide_Character)           @b<return> Boolean;
+   @b<function> Is_String    (Item : @b<in> Wide_String)              @b<return> Boolean;
+   @b<function> Is_Character (Item : @b<in> Wide_Wide_Character)      @b<return> Boolean;
+   @b<function> Is_String    (Item : @b<in> Wide_Wide_String)         @b<return> Boolean;
+   @b<function> Is_Wide_Character (Item : @b<in> Wide_Wide_Character) @b<return> Boolean;
+   @b<function> Is_Wide_String    (Item : @b<in> Wide_Wide_String)    @b<return> Boolean;
+
+   @b<function> To_Wide_Character (Item : @b<in> Character)
+      @b<return> Wide_Character;
+   @b<function> To_Wide_String    (Item : @b<in> String)
+      @b<return> Wide_String;
+   @b<function> To_Wide_Wide_Character (Item : @b<in> Character)
+      @b<return> Wide_Wide_Character;
+   @b<function> To_Wide_Wide_String    (Item : @b<in> String)
+      @b<return> Wide_Wide_String;
+   @b<function> To_Wide_Wide_Character (Item : @b<in> Wide_Character)
+      @b<return> Wide_Wide_Character;
+   @b<function> To_Wide_Wide_String    (Item : @b<in> Wide_String)
+      @b<return> Wide_Wide_String;
+
+   @b<function> To_Character (Item       : @b<in> Wide_Character;
+                         Substitute : @b<in> Character := ' ')
+      @b<return> Character;
+   @b<function> To_String    (Item       : @b<in> Wide_String;
+                          Substitute : @b<in> Character := ' ')
+      @b<return> String;
+   @b<function> To_Character (Item :       @b<in> Wide_Wide_Character;
+                          Substitute : @b<in> Character := ' ')
+      @b<return> Character;
+   @b<function> To_String    (Item :       @b<in> Wide_Wide_String;
+                          Substitute : @b<in> Character := ' ')
+      @b<return> String;
+   @b<function> To_Wide_Character (Item :       @b<in> Wide_Wide_Character;
+                               Substitute : @b<in> Wide_Character := ' ')
+      @b<return> Wide_Character;
+   @b<function> To_Wide_String    (Item :       @b<in> Wide_Wide_String;
+                               Substitute : @b<in> Wide_Character := ' ')
+      @b<return> Wide_String;
+
+@b<end> Ada.Characters.Conversions;>
+
+The functions in package Characters.Conversions test Wide_Wide_Character or Wide_Character values for
+membership in Wide_Character or Character, or convert between corresponding
+characters of Wide_Wide_Character, Wide_Character, and Character.
+
+@xcode<@b<function> Is_Character (Item : @b<in> Wide_Character) @b<return> Boolean;>
+@xindent<Returns True if Wide_Character'Pos(Item) <= Character'Pos(Character'Last).>
+
+@xcode<@b<function> Is_Character (Item : @b<in> Wide_Wide_Character) @b<return> Boolean;>
+@xindent<Returns True if Wide_Wide_Character'Pos(Item) <= Character'Pos(Character'Last).>
+
+@xcode<@b<function> Is_Wide_Character (Item : @b<in> Wide_Wide_Character) @b<return> Boolean;>
+@xindent<Returns True if Wide_Wide_Character'Pos(Item) <=
+Wide_Character'Pos(Wide_Character'Last).>
+
+@xcode<@b<function> Is_String (Item : @b<in> Wide_String)      @b<return> Boolean;
+@b<function> Is_String (Item : @b<in> Wide_Wide_String) @b<return> Boolean;>
+@xindent<Returns True if Is_Character(Item(I)) is True for each I in Item'Range.>
+
+@xcode<@b<function> Is_Wide_String (Item : @b<in> Wide_Wide_String) @b<return> Boolean;>
+@xindent<Returns True if Is_Wide_Character(Item(I)) is True for each I in Item'Range.>
+
+@xcode<@b<function> To_Character (Item :       @b<in> Wide_Character;
+                       Substitute : @b<in> Character := ' ') @b<return> Character;
+@b<function> To_Character (Item :       @b<in> Wide_Wide_Character;
+                       Substitute : @b<in> Character := ' ') @b<return> Character;>
+@xindent<Returns the Character corresponding to Item if Is_Character(Item), and returns
+the Substitute Character otherwise.>
+
+@xcode<@b<function> To_Wide_Character (Item : @b<in> Character) @b<return> Wide_Character;>
+@xindent<Returns the Wide_Character X such that Character'Pos(Item) = Wide_Character'Pos
+(X).>
+
+@xcode<@b<function> To_Wide_Character (Item :       @b<in> Wide_Wide_Character;
+                            Substitute : @b<in> Wide_Character := ' ')
+                            @b<return> Wide_Character;>
+@xindent<Returns the Wide_Character corresponding to Item if Is_Wide_Character(Item),
+and returns the Substitute Wide_Character otherwise.>
+
+@xcode<@b<function> To_Wide_Wide_Character (Item : @b<in> Character) @b<return>
+    Wide_Wide_Character;>
+@xindent<Returns the Wide_Wide_Character X such that Character'Pos(Item) =
+Wide_Wide_Character'Pos (X).>
+
+@xcode<@b<function> To_Wide_Wide_Character (Item : @b<in> Wide_Character)
+                                 @b<return> Wide_Wide_Character;>
+@xindent<Returns the Wide_Wide_Character X such that Wide_Character'Pos(Item) =
+Wide_Wide_Character'Pos (X).>
+
+@xcode<@b<function> To_String (Item :       @b<in> Wide_String;
+                    Substitute : @b<in> Character := ' ') @b<return> String;
+@b<function> To_String (Item :       @b<in> Wide_Wide_String;
+                    Substitute : @b<in> Character := ' ') @b<return> String;>
+@xindent<Returns the String whose range is 1..Item'Length and each of whose elements is
+given by To_Character of the corresponding element in Item.>
+
+@xcode<@b<function> To_Wide_String (Item : @b<in> String) @b<return> Wide_String;>
+@xindent<Returns the Wide_String whose range is 1..Item'Length and each of whose
+elements is given by To_Wide_Character of the corresponding element in Item.>
+
+@xcode<@b<function> To_Wide_String (Item :       @b<in> Wide_Wide_String;
+                         Substitute : @b<in> Wide_Character := ' ')
+                         @b<return> Wide_String;>
+@xindent<Returns the Wide_String whose range is 1..Item'Length and each of whose
+elements is given by To_Wide_Character of the corresponding element in Item
+with the given Substitute Wide_Character.>
+
+@xcode<@b<function> To_Wide_Wide_String (Item : @b<in> String) @b<return> Wide_Wide_String;
+@b<function> To_Wide_Wide_String (Item : @b<in> Wide_String) @b<return> Wide_Wide_String;>
+@xindent<Returns the Wide_Wide_String whose range is 1..Item'Length and each of whose
+elements is given by To_Wide_Wide_Character of the corresponding element in
+Item.>
+
+!corrigendum A.4.7(46)
+
+@drepl
+@xcode<   Character_Set : @b<constant> Wide_Maps.Wide_Character_Set;
+   -- @ft<@i<Contains each Wide_Character value WC such that>>
+   -- @ft<@i<Characters.Is_Character(WC) is True>>>
+@dby
+@xcode<   Character_Set : @b<constant> Wide_Maps.Wide_Character_Set;
+   -- @ft<@i<Contains each Wide_Character value WC such that>>
+   -- @ft<@i<Characters.Conversions.Is_Character(WC) is True>>>
+
+Each Wide_Character_Set constant in the package
+Strings.Wide_Maps.Wide_Constants contains no values outside the Character
+portion of Wide_Character. Similarly, each Wide_Character_Mapping constant in
+this package is the identity mapping when applied to any element outside the
+Character portion of Wide_Character.
+
+!corrigendum A.4.7(48)
+
+@ddel
+@xindent<13  Each Wide_Character_Set constant in the package
+Strings.Wide_Maps.Wide_Constants contains no values outside the Character
+portion of Wide_Character. Similarly, each Wide_Character_Mapping constant in
+this package is the identity mapping when applied to any element outside the
+Character portion of Wide_Character.>
+
+!corrigendum A.4.8(01)
+
+@dinsc
+Facilities for handling strings of Wide_Wide_Character elements are found in
+the packages Strings.Wide_Wide_Maps, Strings.Wide_Wide_Fixed,
+Strings.Wide_Wide_Bounded, Strings.Wide_Wide_Unbounded, and
+Strings.Wide_Wide_Maps.Wide_Wide_Constants, and in the function
+Strings.Wide_Wide_Hash and Strings.Wide_Wide_Unbounded.Wide_Wide_Hash. They
+provide the same string-handling operations as the corresponding packages for
+strings of Character elements.
+
+@i<@s8<Static Semantics>>
+
+The library package Strings.Wide_Wide_Maps has the following declaration.
+
+@xcode<@b<package> Ada.Strings.Wide_Wide_Maps @b<is>
+   @b<pragma> Preelaborate(Wide_Wide_Maps);
+
+   -- @ft<@i<Representation for a set of Wide_Wide_Character values:>>
+   @b<type> Wide_Wide_Character_Set @b<is private>;
+   @b<pragma> Preelaborable_Initialization(Wide_Wide_Character_Set);
+
+   Null_Set : @b<constant> Wide_Wide_Character_Set;
+
+   @b<type> Wide_Wide_Character_Range @b<is>
+      @b<record>
+         Low : Wide_Wide_Character;
+         High : Wide_Wide_Character;
+      @b<end record>;
+   -- @ft<@i<Represents Wide_Wide_Character range Low..High>>
+
+   @b<type> Wide_Wide_Character_Ranges @b<is array> (Positive @b<range> <@>)
+         @b<of> Wide_Wide_Character_Range;
+
+   @b<function> To_Set (Ranges : @b<in> Wide_Wide_Character_Ranges)
+         @b<return> Wide_Wide_Character_Set;
+
+   @b<function> To_Set (Span : @b<in> Wide_Wide_Character_Range)
+         @b<return> Wide_Wide_Character_Set;
+
+   @b<function> To_Ranges (Set : @b<in> Wide_Wide_Character_Set)
+         @b<return> Wide_Wide_Character_Ranges;
+
+   @b<function> "=" (Left, Right : @b<in> Wide_Wide_Character_Set) @b<return> Boolean;
+
+   @b<function> "@b<not>" (Right : @b<in> Wide_Wide_Character_Set)
+         @b<return> Wide_Wide_Character_Set;
+   @b<function> "@b<and>" (Left, Right : @b<in> Wide_Wide_Character_Set)
+         @b<return> Wide_Wide_Character_Set;
+   @b<function> "@b<or>" (Left, Right : @b<in> Wide_Wide_Character_Set)
+         @b<return> Wide_Wide_Character_Set;
+   @b<function> "@b<xor>" (Left, Right : @b<in> Wide_Wide_Character_Set)
+         @b<return> Wide_Wide_Character_Set;
+   @b<function> "-" (Left, Right : @b<in> Wide_Wide_Character_Set)
+         @b<return> Wide_Wide_Character_Set;
+
+   @b<function> Is_In (Element : @b<in> Wide_Wide_Character;
+                   Set : @b<in> Wide_Wide_Character_Set)
+         @b<return> Boolean;
+
+   @b<function> Is_Subset (Elements : @b<in> Wide_Wide_Character_Set;
+                       Set : @b<in> Wide_Wide_Character_Set)
+         @b<return> Boolean;
+
+   @b<function> "<=" (Left : @b<in> Wide_Wide_Character_Set;
+                  Right : @b<in> Wide_Wide_Character_Set)
+         @b<return> Boolean @b<renames> Is_Subset;
+
+   -- @ft<@i<Alternative representation for a set of Wide_Wide_Character values:>>
+   @b<subtype> Wide_Wide_Character_Sequence @b<is> Wide_Wide_String;
+
+   @b<function> To_Set (Sequence : @b<in> Wide_Wide_Character_Sequence)
+         @b<return> Wide_Wide_Character_Set;
+
+   @b<function> To_Set (Singleton : @b<in> Wide_Wide_Character)
+         @b<return> Wide_Wide_Character_Set;
+
+   @b<function> To_Sequence (Set : @b<in> Wide_Wide_Character_Set)
+         @b<return> Wide_Wide_Character_Sequence;
+
+   -- @ft<@i<Representation for a Wide_Wide_Character to Wide_Wide_Character>>
+   -- @ft<@i<mapping:>>
+   @b<type> Wide_Wide_Character_Mapping @b<is private>;
+   @b<pragma> Preelaborable_Initialization(Wide_Wide_Character_Mapping);
+
+   @b<function> Value (Map : @b<in> Wide_Wide_Character_Mapping;
+                   Element : @b<in> Wide_Wide_Character)
+         @b<return> Wide_Wide_Character;
+
+   Identity : @b<constant> Wide_Wide_Character_Mapping;
+
+   @b<function> To_Mapping (From, To : @b<in> Wide_Wide_Character_Sequence)
+         @b<return> Wide_Wide_Character_Mapping;
+
+   @b<function> To_Domain (Map : @b<in> Wide_Wide_Character_Mapping)
+         @b<return> Wide_Wide_Character_Sequence;
+
+   @b<function> To_Range (Map : @b<in> Wide_Wide_Character_Mapping)
+         @b<return> Wide_Wide_Character_Sequence;
+
+   @b<type> Wide_Wide_Character_Mapping_Function @b<is>
+         @b<access function> (From : @b<in> Wide_Wide_Character)
+         @b<return> Wide_Wide_Character;
+
+@b<private>
+   ... -- @ft<@i<not specified by the language>>
+@b<end> Ada.Strings.Wide_Wide_Maps;>
+
+The context clause for each of the packages Strings.Wide_Wide_Fixed,
+Strings.Wide_Wide_Bounded, and Strings.Wide_Wide_Unbounded identifies
+Strings.Wide_Wide_Maps instead of Strings.Maps.
+
+For each of the packages Strings.Fixed, Strings.Bounded, Strings.Unbounded, and
+Strings.Maps.Constants, and for functions String.Wide_Wide_Hash and
+Strings.Wide_Wide_Unbounded.Wide_Wide_Hash, the corresponding wide wide string
+package has the same contents except that
+
+@xbullet<Wide_Wide_Space replaces Space>
+@xbullet<Wide_Wide_Character replaces Character>
+@xbullet<Wide_Wide_String replaces String>
+@xbullet<Wide_Wide_Character_Set replaces Character_Set>
+@xbullet<Wide_Wide_Character_Mapping replaces Character_Mapping>
+@xbullet<Wide_Wide_Character_Mapping_Function replaces Character_Mapping_Function>
+@xbullet<Wide_Wide_Maps replaces Maps>
+@xbullet<Bounded_Wide_Wide_String replaces Bounded_String>
+@xbullet<Null_Bounded_Wide_Wide_String replaces Null_Bounded_String>
+@xbullet<To_Bounded_Wide_Wide_String replaces To_Bounded_String>
+@xbullet<To_Wide_Wide_String replaces To_String>
+@xbullet<Set_Bounded_Wide_Wide_String replaces Set_Bounded_String>
+@xbullet<Unbounded_Wide_Wide_String replaces Unbounded_String>
+@xbullet<Null_Unbounded_Wide_Wide_String replaces Null_Unbounded_String>
+@xbullet<Wide_Wide_String_Access replaces String_Access>
+@xbullet<To_Unbounded_Wide_Wide_String replaces To_Unbounded_String>
+@xbullet<Set_Unbounded_Wide_Wide_String replaces Set_Unbounded_String>
+
+The following additional declarations are present in
+Strings.Wide_Wide_Maps.Wide_Wide_Constants:
+
+@xcode<   Character_Set : @b<constant> Wide_Wide_Maps.Wide_Wide_Character_Set;
+   -- @ft<@i<Contains each Wide_Wide_Character value WWC such that>>
+   -- @ft<@i<Characters.Conversions.Is_Character(WWC) is True>>
+   Wide_Character_Set : @b<constant> Wide_Wide_Maps.Wide_Wide_Character_Set;
+   -- @ft<@i<Contains each Wide_Wide_Character value WWC such that>>
+   --@ft<@i< Characters.Conversions.Is_Wide_Character(WWC) is True>>>
+
+Each Wide_Wide_Character_Set constant in the package
+Strings.Wide_Wide_Maps.Wide_Wide_Constants contains no values outside the
+Character portion of Wide_Wide_Character. Similarly, each
+Wide_Wide_Character_Mapping constant in this package is the identity mapping
+when applied to any element outside the Character portion of
+Wide_Wide_Character.
+
+Pragma Pure is replaced by pragma Preelaborate in
+Strings.Wide_Wide_Maps.Wide_Wide_Constants.
+
+@xindent<@s9<NOTES@hr
+14  If a null Wide_Wide_Character_Mapping_Function is passed to any of the
+Wide_Wide_String handling subprograms, Constraint_Error is propagated.>>
+
+!corrigendum J.14(00)
+
+@dinsc
+The following declarations exist in the declaration of package
+Ada.Characters.Handling:
+
+@xcode<
+   @b<function> Is_Character (Item : @b<in> Wide_Character) @b<return> Boolean
+      @b<renames> Conversions.Is_Character;
+   @b<function> Is_String    (Item : @b<in> Wide_String)    @b<return> Boolean
+      @b<renames> Conversions.Is_String;
+
+   @b<function> To_Character (Item       : @b<in> Wide_Character;
+                         Substitute : @b<in> Character := ' ')  @b<return> Character
+      @b<renames> Conversions.To_Character;
+
+   @b<function> To_String    (Item       : @b<in> Wide_String;
+                          Substitute : @b<in> Character := ' ') @b<return> String
+      @b<renames> Conversions.To_String;
+
+   @b<function> To_Wide_Character (Item : @b<in> Character) @b<return> Wide_Character
+      @b<renames> Conversions.To_Wide_Character;
+
+   @b<function> To_Wide_String    (Item : @b<in> String)    @b<return> Wide_String
+      @b<renames> Conversions.To_Wide_String;>
 
---!corrigendum
 
 !ACATS test
 

Questions? Ask the ACAA Technical Agent