1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- A D A . S T R I N G S . W I D E _ M A P S . W I D E _ C O N S T A N T S --
11 -- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
13 -- This specification is derived from the Ada Reference Manual for use with --
14 -- GNAT. The copyright notice above, and the license provisions that follow --
15 -- apply solely to the contents of the part following the private keyword. --
17 -- GNAT is free software; you can redistribute it and/or modify it under --
18 -- terms of the GNU General Public License as published by the Free Soft- --
19 -- ware Foundation; either version 2, or (at your option) any later ver- --
20 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
21 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
22 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
23 -- for more details. You should have received a copy of the GNU General --
24 -- Public License distributed with GNAT; see file COPYING. If not, write --
25 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
26 -- MA 02111-1307, USA. --
28 -- As a special exception, if other files instantiate generics from this --
29 -- unit, or you link this unit with other files to produce an executable, --
30 -- this unit does not by itself cause the resulting executable to be --
31 -- covered by the GNU General Public License. This exception does not --
32 -- however invalidate any other reasons why the executable file might be --
33 -- covered by the GNU Public License. --
35 -- GNAT was originally developed by the GNAT team at New York University. --
36 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
38 ------------------------------------------------------------------------------
40 with Ada
.Characters
.Wide_Latin_1
;
42 package Ada
.Strings
.Wide_Maps
.Wide_Constants
is
43 pragma Preelaborate
(Wide_Constants
);
45 Control_Set
: constant Wide_Maps
.Wide_Character_Set
;
46 Graphic_Set
: constant Wide_Maps
.Wide_Character_Set
;
47 Letter_Set
: constant Wide_Maps
.Wide_Character_Set
;
48 Lower_Set
: constant Wide_Maps
.Wide_Character_Set
;
49 Upper_Set
: constant Wide_Maps
.Wide_Character_Set
;
50 Basic_Set
: constant Wide_Maps
.Wide_Character_Set
;
51 Decimal_Digit_Set
: constant Wide_Maps
.Wide_Character_Set
;
52 Hexadecimal_Digit_Set
: constant Wide_Maps
.Wide_Character_Set
;
53 Alphanumeric_Set
: constant Wide_Maps
.Wide_Character_Set
;
54 Special_Graphic_Set
: constant Wide_Maps
.Wide_Character_Set
;
55 ISO_646_Set
: constant Wide_Maps
.Wide_Character_Set
;
56 Character_Set
: constant Wide_Maps
.Wide_Character_Set
;
58 Lower_Case_Map
: constant Wide_Maps
.Wide_Character_Mapping
;
59 -- Maps to lower case for letters, else identity
61 Upper_Case_Map
: constant Wide_Maps
.Wide_Character_Mapping
;
62 -- Maps to upper case for letters, else identity
64 Basic_Map
: constant Wide_Maps
.Wide_Character_Mapping
;
65 -- Maps to basic letter for letters, else identity
68 package W
renames Ada
.Characters
.Wide_Latin_1
;
70 subtype WC
is Wide_Character;
72 Control_Ranges
: aliased constant Wide_Character_Ranges
:=
76 Control_Set
: constant Wide_Character_Set
:=
78 Control_Ranges
'Unrestricted_Access);
80 Graphic_Ranges
: aliased constant Wide_Character_Ranges
:=
82 (WC
'Val (256), WC
'Last));
84 Graphic_Set
: constant Wide_Character_Set
:=
86 Graphic_Ranges
'Unrestricted_Access);
88 Letter_Ranges
: aliased constant Wide_Character_Ranges
:=
91 (W
.UC_A_Grave
, W
.UC_O_Diaeresis
),
92 (W
.UC_O_Oblique_Stroke
, W
.LC_O_Diaeresis
),
93 (W
.LC_O_Oblique_Stroke
, W
.LC_Y_Diaeresis
));
95 Letter_Set
: constant Wide_Character_Set
:=
97 Letter_Ranges
'Unrestricted_Access);
99 Lower_Ranges
: aliased constant Wide_Character_Ranges
:=
100 (1 => (W
.LC_A
, W
.LC_Z
),
101 2 => (W
.LC_German_Sharp_S
, W
.LC_O_Diaeresis
),
102 3 => (W
.LC_O_Oblique_Stroke
, W
.LC_Y_Diaeresis
));
104 Lower_Set
: constant Wide_Character_Set
:=
106 Lower_Ranges
'Unrestricted_Access);
108 Upper_Ranges
: aliased constant Wide_Character_Ranges
:=
110 2 => (W
.UC_A_Grave
, W
.UC_O_Diaeresis
),
111 3 => (W
.UC_O_Oblique_Stroke
, W
.UC_Icelandic_Thorn
));
113 Upper_Set
: constant Wide_Character_Set
:=
115 Upper_Ranges
'Unrestricted_Access);
117 Basic_Ranges
: aliased constant Wide_Character_Ranges
:=
119 2 => (W
.LC_A
, W
.LC_Z
),
120 3 => (W
.UC_AE_Diphthong
, W
.UC_AE_Diphthong
),
121 4 => (W
.LC_AE_Diphthong
, W
.LC_AE_Diphthong
),
122 5 => (W
.LC_German_Sharp_S
, W
.LC_German_Sharp_S
),
123 6 => (W
.UC_Icelandic_Thorn
, W
.UC_Icelandic_Thorn
),
124 7 => (W
.LC_Icelandic_Thorn
, W
.LC_Icelandic_Thorn
),
125 8 => (W
.UC_Icelandic_Eth
, W
.UC_Icelandic_Eth
),
126 9 => (W
.LC_Icelandic_Eth
, W
.LC_Icelandic_Eth
));
128 Basic_Set
: constant Wide_Character_Set
:=
130 Basic_Ranges
'Unrestricted_Access);
132 Decimal_Digit_Ranges
: aliased constant Wide_Character_Ranges
:=
135 Decimal_Digit_Set
: constant Wide_Character_Set
:=
137 Decimal_Digit_Ranges
'Unrestricted_Access);
139 Hexadecimal_Digit_Ranges
: aliased constant Wide_Character_Ranges
:=
142 3 => (W
.LC_A
, W
.LC_F
));
144 Hexadecimal_Digit_Set
: constant Wide_Character_Set
:=
146 Hexadecimal_Digit_Ranges
'Unrestricted_Access);
148 Alphanumeric_Ranges
: aliased constant Wide_Character_Ranges
:=
151 3 => (W
.LC_A
, W
.LC_Z
),
152 4 => (W
.UC_A_Grave
, W
.UC_O_Diaeresis
),
153 5 => (W
.UC_O_Oblique_Stroke
, W
.LC_O_Diaeresis
),
154 6 => (W
.LC_O_Oblique_Stroke
, W
.LC_Y_Diaeresis
));
156 Alphanumeric_Set
: constant Wide_Character_Set
:=
158 Alphanumeric_Ranges
'Unrestricted_Access);
160 Special_Graphic_Ranges
: aliased constant Wide_Character_Ranges
:=
161 (1 => (Wide_Space
, W
.Solidus
),
162 2 => (W
.Colon
, W
.Commercial_At
),
163 3 => (W
.Left_Square_Bracket
, W
.Grave
),
164 4 => (W
.Left_Curly_Bracket
, W
.Tilde
),
165 5 => (W
.No_Break_Space
, W
.Inverted_Question
),
166 6 => (W
.Multiplication_Sign
, W
.Multiplication_Sign
),
167 7 => (W
.Division_Sign
, W
.Division_Sign
));
169 Special_Graphic_Set
: constant Wide_Character_Set
:=
171 Special_Graphic_Ranges
'Unrestricted_Access);
173 ISO_646_Ranges
: aliased constant Wide_Character_Ranges
:=
174 (1 => (W
.NUL
, W
.DEL
));
176 ISO_646_Set
: constant Wide_Character_Set
:=
178 ISO_646_Ranges
'Unrestricted_Access);
180 Character_Ranges
: aliased constant Wide_Character_Ranges
:=
181 (1 => (W
.NUL
, WC
'Val (255)));
183 Character_Set
: constant Wide_Character_Set
:=
185 Character_Ranges
'Unrestricted_Access);
188 Lower_Case_Mapping
: aliased constant Wide_Character_Mapping_Values
:=
192 "ABCDEFGHIJKLMNOPQRSTUVWXYZ" &
216 W
.UC_O_Oblique_Stroke
&
222 W
.UC_Icelandic_Thorn
,
225 "abcdefghijklmnopqrstuvwxyz" &
249 W
.LC_O_Oblique_Stroke
&
255 W
.LC_Icelandic_Thorn
);
257 Lower_Case_Map
: constant Wide_Character_Mapping
:=
259 Map
=> Lower_Case_Mapping
'Unrestricted_Access);
261 Upper_Case_Mapping
: aliased constant Wide_Character_Mapping_Values
:=
265 "abcdefghijklmnopqrstuvwxyz" &
289 W
.LC_O_Oblique_Stroke
&
295 W
.LC_Icelandic_Thorn
,
298 "ABCDEFGHIJKLMNOPQRSTUVWXYZ" &
322 W
.UC_O_Oblique_Stroke
&
328 W
.UC_Icelandic_Thorn
);
330 Upper_Case_Map
: constant Wide_Character_Mapping
:=
332 Upper_Case_Mapping
'Unrestricted_Access);
334 Basic_Mapping
: aliased constant Wide_Character_Mapping_Values
:=
359 W
.UC_O_Oblique_Stroke
&
386 W
.LC_O_Oblique_Stroke
&
397 'A' & -- UC_A_Circumflex
399 'A' & -- UC_A_Diaeresis
401 'C' & -- UC_C_Cedilla
404 'E' & -- UC_E_Circumflex
405 'E' & -- UC_E_Diaeresis
408 'I' & -- UC_I_Circumflex
409 'I' & -- UC_I_Diaeresis
413 'O' & -- UC_O_Circumflex
415 'O' & -- UC_O_Diaeresis
416 'O' & -- UC_O_Oblique_Stroke
419 'U' & -- UC_U_Circumflex
420 'U' & -- UC_U_Diaeresis
424 'a' & -- LC_A_Circumflex
426 'a' & -- LC_A_Diaeresis
428 'c' & -- LC_C_Cedilla
431 'e' & -- LC_E_Circumflex
432 'e' & -- LC_E_Diaeresis
435 'i' & -- LC_I_Circumflex
436 'i' & -- LC_I_Diaeresis
440 'o' & -- LC_O_Circumflex
442 'o' & -- LC_O_Diaeresis
443 'o' & -- LC_O_Oblique_Stroke
446 'u' & -- LC_U_Circumflex
447 'u' & -- LC_U_Diaeresis
449 'y'); -- LC_Y_Diaeresis
451 Basic_Map
: constant Wide_Character_Mapping
:=
453 Basic_Mapping
'Unrestricted_Access);
455 end Ada
.Strings
.Wide_Maps
.Wide_Constants
;