Mark ChangeLog
[official-gcc.git] / gcc / ada / a-swmwco.ads
blob200d90099a388e92a09c9b751113a74d92ebf98b
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME COMPONENTS --
4 -- --
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 --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
10 -- --
11 -- This specification is derived from the Ada Reference Manual for use with --
12 -- GNAT. The copyright notice above, and the license provisions that follow --
13 -- apply solely to the contents of the part following the private keyword. --
14 -- --
15 -- GNAT is free software; you can redistribute it and/or modify it under --
16 -- terms of the GNU General Public License as published by the Free Soft- --
17 -- ware Foundation; either version 2, or (at your option) any later ver- --
18 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
19 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
20 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
21 -- for more details. You should have received a copy of the GNU General --
22 -- Public License distributed with GNAT; see file COPYING. If not, write --
23 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
24 -- MA 02111-1307, USA. --
25 -- --
26 -- As a special exception, if other files instantiate generics from this --
27 -- unit, or you link this unit with other files to produce an executable, --
28 -- this unit does not by itself cause the resulting executable to be --
29 -- covered by the GNU General Public License. This exception does not --
30 -- however invalidate any other reasons why the executable file might be --
31 -- covered by the GNU Public License. --
32 -- --
33 -- GNAT was originally developed by the GNAT team at New York University. --
34 -- Extensive contributions were provided by Ada Core Technologies Inc. --
35 -- --
36 ------------------------------------------------------------------------------
38 with Ada.Characters.Wide_Latin_1;
40 package Ada.Strings.Wide_Maps.Wide_Constants is
41 pragma Preelaborate (Wide_Constants);
43 Control_Set : constant Wide_Maps.Wide_Character_Set;
44 Graphic_Set : constant Wide_Maps.Wide_Character_Set;
45 Letter_Set : constant Wide_Maps.Wide_Character_Set;
46 Lower_Set : constant Wide_Maps.Wide_Character_Set;
47 Upper_Set : constant Wide_Maps.Wide_Character_Set;
48 Basic_Set : constant Wide_Maps.Wide_Character_Set;
49 Decimal_Digit_Set : constant Wide_Maps.Wide_Character_Set;
50 Hexadecimal_Digit_Set : constant Wide_Maps.Wide_Character_Set;
51 Alphanumeric_Set : constant Wide_Maps.Wide_Character_Set;
52 Special_Graphic_Set : constant Wide_Maps.Wide_Character_Set;
53 ISO_646_Set : constant Wide_Maps.Wide_Character_Set;
54 Character_Set : constant Wide_Maps.Wide_Character_Set;
56 Lower_Case_Map : constant Wide_Maps.Wide_Character_Mapping;
57 -- Maps to lower case for letters, else identity
59 Upper_Case_Map : constant Wide_Maps.Wide_Character_Mapping;
60 -- Maps to upper case for letters, else identity
62 Basic_Map : constant Wide_Maps.Wide_Character_Mapping;
63 -- Maps to basic letter for letters, else identity
65 private
66 package W renames Ada.Characters.Wide_Latin_1;
68 subtype WC is Wide_Character;
70 Control_Ranges : aliased constant Wide_Character_Ranges :=
71 ((W.NUL, W.US),
72 (W.DEL, W.APC));
74 Control_Set : constant Wide_Character_Set :=
75 (AF.Controlled with
76 Control_Ranges'Unrestricted_Access);
78 Graphic_Ranges : aliased constant Wide_Character_Ranges :=
79 ((W.Space, W.Tilde),
80 (WC'Val (256), WC'Last));
82 Graphic_Set : constant Wide_Character_Set :=
83 (AF.Controlled with
84 Graphic_Ranges'Unrestricted_Access);
86 Letter_Ranges : aliased constant Wide_Character_Ranges :=
87 (('A', 'Z'),
88 (W.LC_A, W.LC_Z),
89 (W.UC_A_Grave, W.UC_O_Diaeresis),
90 (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis),
91 (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis));
93 Letter_Set : constant Wide_Character_Set :=
94 (AF.Controlled with
95 Letter_Ranges'Unrestricted_Access);
97 Lower_Ranges : aliased constant Wide_Character_Ranges :=
98 (1 => (W.LC_A, W.LC_Z),
99 2 => (W.LC_German_Sharp_S, W.LC_O_Diaeresis),
100 3 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis));
102 Lower_Set : constant Wide_Character_Set :=
103 (AF.Controlled with
104 Lower_Ranges'Unrestricted_Access);
106 Upper_Ranges : aliased constant Wide_Character_Ranges :=
107 (1 => ('A', 'Z'),
108 2 => (W.UC_A_Grave, W.UC_O_Diaeresis),
109 3 => (W.UC_O_Oblique_Stroke, W.UC_Icelandic_Thorn));
111 Upper_Set : constant Wide_Character_Set :=
112 (AF.Controlled with
113 Upper_Ranges'Unrestricted_Access);
115 Basic_Ranges : aliased constant Wide_Character_Ranges :=
116 (1 => ('A', 'Z'),
117 2 => (W.LC_A, W.LC_Z),
118 3 => (W.UC_AE_Diphthong, W.UC_AE_Diphthong),
119 4 => (W.LC_AE_Diphthong, W.LC_AE_Diphthong),
120 5 => (W.LC_German_Sharp_S, W.LC_German_Sharp_S),
121 6 => (W.UC_Icelandic_Thorn, W.UC_Icelandic_Thorn),
122 7 => (W.LC_Icelandic_Thorn, W.LC_Icelandic_Thorn),
123 8 => (W.UC_Icelandic_Eth, W.UC_Icelandic_Eth),
124 9 => (W.LC_Icelandic_Eth, W.LC_Icelandic_Eth));
126 Basic_Set : constant Wide_Character_Set :=
127 (AF.Controlled with
128 Basic_Ranges'Unrestricted_Access);
130 Decimal_Digit_Ranges : aliased constant Wide_Character_Ranges :=
131 (1 => ('0', '9'));
133 Decimal_Digit_Set : constant Wide_Character_Set :=
134 (AF.Controlled with
135 Decimal_Digit_Ranges'Unrestricted_Access);
137 Hexadecimal_Digit_Ranges : aliased constant Wide_Character_Ranges :=
138 (1 => ('0', '9'),
139 2 => ('A', 'F'),
140 3 => (W.LC_A, W.LC_F));
142 Hexadecimal_Digit_Set : constant Wide_Character_Set :=
143 (AF.Controlled with
144 Hexadecimal_Digit_Ranges'Unrestricted_Access);
146 Alphanumeric_Ranges : aliased constant Wide_Character_Ranges :=
147 (1 => ('0', '9'),
148 2 => ('A', 'Z'),
149 3 => (W.LC_A, W.LC_Z),
150 4 => (W.UC_A_Grave, W.UC_O_Diaeresis),
151 5 => (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis),
152 6 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis));
154 Alphanumeric_Set : constant Wide_Character_Set :=
155 (AF.Controlled with
156 Alphanumeric_Ranges'Unrestricted_Access);
158 Special_Graphic_Ranges : aliased constant Wide_Character_Ranges :=
159 (1 => (Wide_Space, W.Solidus),
160 2 => (W.Colon, W.Commercial_At),
161 3 => (W.Left_Square_Bracket, W.Grave),
162 4 => (W.Left_Curly_Bracket, W.Tilde),
163 5 => (W.No_Break_Space, W.Inverted_Question),
164 6 => (W.Multiplication_Sign, W.Multiplication_Sign),
165 7 => (W.Division_Sign, W.Division_Sign));
167 Special_Graphic_Set : constant Wide_Character_Set :=
168 (AF.Controlled with
169 Special_Graphic_Ranges'Unrestricted_Access);
171 ISO_646_Ranges : aliased constant Wide_Character_Ranges :=
172 (1 => (W.NUL, W.DEL));
174 ISO_646_Set : constant Wide_Character_Set :=
175 (AF.Controlled with
176 ISO_646_Ranges'Unrestricted_Access);
178 Character_Ranges : aliased constant Wide_Character_Ranges :=
179 (1 => (W.NUL, WC'Val (255)));
181 Character_Set : constant Wide_Character_Set :=
182 (AF.Controlled with
183 Character_Ranges'Unrestricted_Access);
186 Lower_Case_Mapping : aliased constant Wide_Character_Mapping_Values :=
187 (Length => 56,
189 Domain =>
190 "ABCDEFGHIJKLMNOPQRSTUVWXYZ" &
191 W.UC_A_Grave &
192 W.UC_A_Acute &
193 W.UC_A_Circumflex &
194 W.UC_A_Tilde &
195 W.UC_A_Diaeresis &
196 W.UC_A_Ring &
197 W.UC_AE_Diphthong &
198 W.UC_C_Cedilla &
199 W.UC_E_Grave &
200 W.UC_E_Acute &
201 W.UC_E_Circumflex &
202 W.UC_E_Diaeresis &
203 W.UC_I_Grave &
204 W.UC_I_Acute &
205 W.UC_I_Circumflex &
206 W.UC_I_Diaeresis &
207 W.UC_Icelandic_Eth &
208 W.UC_N_Tilde &
209 W.UC_O_Grave &
210 W.UC_O_Acute &
211 W.UC_O_Circumflex &
212 W.UC_O_Tilde &
213 W.UC_O_Diaeresis &
214 W.UC_O_Oblique_Stroke &
215 W.UC_U_Grave &
216 W.UC_U_Acute &
217 W.UC_U_Circumflex &
218 W.UC_U_Diaeresis &
219 W.UC_Y_Acute &
220 W.UC_Icelandic_Thorn,
222 Rangev =>
223 "abcdefghijklmnopqrstuvwxyz" &
224 W.LC_A_Grave &
225 W.LC_A_Acute &
226 W.LC_A_Circumflex &
227 W.LC_A_Tilde &
228 W.LC_A_Diaeresis &
229 W.LC_A_Ring &
230 W.LC_AE_Diphthong &
231 W.LC_C_Cedilla &
232 W.LC_E_Grave &
233 W.LC_E_Acute &
234 W.LC_E_Circumflex &
235 W.LC_E_Diaeresis &
236 W.LC_I_Grave &
237 W.LC_I_Acute &
238 W.LC_I_Circumflex &
239 W.LC_I_Diaeresis &
240 W.LC_Icelandic_Eth &
241 W.LC_N_Tilde &
242 W.LC_O_Grave &
243 W.LC_O_Acute &
244 W.LC_O_Circumflex &
245 W.LC_O_Tilde &
246 W.LC_O_Diaeresis &
247 W.LC_O_Oblique_Stroke &
248 W.LC_U_Grave &
249 W.LC_U_Acute &
250 W.LC_U_Circumflex &
251 W.LC_U_Diaeresis &
252 W.LC_Y_Acute &
253 W.LC_Icelandic_Thorn);
255 Lower_Case_Map : constant Wide_Character_Mapping :=
256 (AF.Controlled with
257 Map => Lower_Case_Mapping'Unrestricted_Access);
259 Upper_Case_Mapping : aliased constant Wide_Character_Mapping_Values :=
260 (Length => 56,
262 Domain =>
263 "abcdefghijklmnopqrstuvwxyz" &
264 W.LC_A_Grave &
265 W.LC_A_Acute &
266 W.LC_A_Circumflex &
267 W.LC_A_Tilde &
268 W.LC_A_Diaeresis &
269 W.LC_A_Ring &
270 W.LC_AE_Diphthong &
271 W.LC_C_Cedilla &
272 W.LC_E_Grave &
273 W.LC_E_Acute &
274 W.LC_E_Circumflex &
275 W.LC_E_Diaeresis &
276 W.LC_I_Grave &
277 W.LC_I_Acute &
278 W.LC_I_Circumflex &
279 W.LC_I_Diaeresis &
280 W.LC_Icelandic_Eth &
281 W.LC_N_Tilde &
282 W.LC_O_Grave &
283 W.LC_O_Acute &
284 W.LC_O_Circumflex &
285 W.LC_O_Tilde &
286 W.LC_O_Diaeresis &
287 W.LC_O_Oblique_Stroke &
288 W.LC_U_Grave &
289 W.LC_U_Acute &
290 W.LC_U_Circumflex &
291 W.LC_U_Diaeresis &
292 W.LC_Y_Acute &
293 W.LC_Icelandic_Thorn,
295 Rangev =>
296 "ABCDEFGHIJKLMNOPQRSTUVWXYZ" &
297 W.UC_A_Grave &
298 W.UC_A_Acute &
299 W.UC_A_Circumflex &
300 W.UC_A_Tilde &
301 W.UC_A_Diaeresis &
302 W.UC_A_Ring &
303 W.UC_AE_Diphthong &
304 W.UC_C_Cedilla &
305 W.UC_E_Grave &
306 W.UC_E_Acute &
307 W.UC_E_Circumflex &
308 W.UC_E_Diaeresis &
309 W.UC_I_Grave &
310 W.UC_I_Acute &
311 W.UC_I_Circumflex &
312 W.UC_I_Diaeresis &
313 W.UC_Icelandic_Eth &
314 W.UC_N_Tilde &
315 W.UC_O_Grave &
316 W.UC_O_Acute &
317 W.UC_O_Circumflex &
318 W.UC_O_Tilde &
319 W.UC_O_Diaeresis &
320 W.UC_O_Oblique_Stroke &
321 W.UC_U_Grave &
322 W.UC_U_Acute &
323 W.UC_U_Circumflex &
324 W.UC_U_Diaeresis &
325 W.UC_Y_Acute &
326 W.UC_Icelandic_Thorn);
328 Upper_Case_Map : constant Wide_Character_Mapping :=
329 (AF.Controlled with
330 Upper_Case_Mapping'Unrestricted_Access);
332 Basic_Mapping : aliased constant Wide_Character_Mapping_Values :=
333 (Length => 55,
335 Domain =>
336 W.UC_A_Grave &
337 W.UC_A_Acute &
338 W.UC_A_Circumflex &
339 W.UC_A_Tilde &
340 W.UC_A_Diaeresis &
341 W.UC_A_Ring &
342 W.UC_C_Cedilla &
343 W.UC_E_Grave &
344 W.UC_E_Acute &
345 W.UC_E_Circumflex &
346 W.UC_E_Diaeresis &
347 W.UC_I_Grave &
348 W.UC_I_Acute &
349 W.UC_I_Circumflex &
350 W.UC_I_Diaeresis &
351 W.UC_N_Tilde &
352 W.UC_O_Grave &
353 W.UC_O_Acute &
354 W.UC_O_Circumflex &
355 W.UC_O_Tilde &
356 W.UC_O_Diaeresis &
357 W.UC_O_Oblique_Stroke &
358 W.UC_U_Grave &
359 W.UC_U_Acute &
360 W.UC_U_Circumflex &
361 W.UC_U_Diaeresis &
362 W.UC_Y_Acute &
363 W.LC_A_Grave &
364 W.LC_A_Acute &
365 W.LC_A_Circumflex &
366 W.LC_A_Tilde &
367 W.LC_A_Diaeresis &
368 W.LC_A_Ring &
369 W.LC_C_Cedilla &
370 W.LC_E_Grave &
371 W.LC_E_Acute &
372 W.LC_E_Circumflex &
373 W.LC_E_Diaeresis &
374 W.LC_I_Grave &
375 W.LC_I_Acute &
376 W.LC_I_Circumflex &
377 W.LC_I_Diaeresis &
378 W.LC_N_Tilde &
379 W.LC_O_Grave &
380 W.LC_O_Acute &
381 W.LC_O_Circumflex &
382 W.LC_O_Tilde &
383 W.LC_O_Diaeresis &
384 W.LC_O_Oblique_Stroke &
385 W.LC_U_Grave &
386 W.LC_U_Acute &
387 W.LC_U_Circumflex &
388 W.LC_U_Diaeresis &
389 W.LC_Y_Acute &
390 W.LC_Y_Diaeresis,
392 Rangev =>
393 'A' & -- UC_A_Grave
394 'A' & -- UC_A_Acute
395 'A' & -- UC_A_Circumflex
396 'A' & -- UC_A_Tilde
397 'A' & -- UC_A_Diaeresis
398 'A' & -- UC_A_Ring
399 'C' & -- UC_C_Cedilla
400 'E' & -- UC_E_Grave
401 'E' & -- UC_E_Acute
402 'E' & -- UC_E_Circumflex
403 'E' & -- UC_E_Diaeresis
404 'I' & -- UC_I_Grave
405 'I' & -- UC_I_Acute
406 'I' & -- UC_I_Circumflex
407 'I' & -- UC_I_Diaeresis
408 'N' & -- UC_N_Tilde
409 'O' & -- UC_O_Grave
410 'O' & -- UC_O_Acute
411 'O' & -- UC_O_Circumflex
412 'O' & -- UC_O_Tilde
413 'O' & -- UC_O_Diaeresis
414 'O' & -- UC_O_Oblique_Stroke
415 'U' & -- UC_U_Grave
416 'U' & -- UC_U_Acute
417 'U' & -- UC_U_Circumflex
418 'U' & -- UC_U_Diaeresis
419 'Y' & -- UC_Y_Acute
420 'a' & -- LC_A_Grave
421 'a' & -- LC_A_Acute
422 'a' & -- LC_A_Circumflex
423 'a' & -- LC_A_Tilde
424 'a' & -- LC_A_Diaeresis
425 'a' & -- LC_A_Ring
426 'c' & -- LC_C_Cedilla
427 'e' & -- LC_E_Grave
428 'e' & -- LC_E_Acute
429 'e' & -- LC_E_Circumflex
430 'e' & -- LC_E_Diaeresis
431 'i' & -- LC_I_Grave
432 'i' & -- LC_I_Acute
433 'i' & -- LC_I_Circumflex
434 'i' & -- LC_I_Diaeresis
435 'n' & -- LC_N_Tilde
436 'o' & -- LC_O_Grave
437 'o' & -- LC_O_Acute
438 'o' & -- LC_O_Circumflex
439 'o' & -- LC_O_Tilde
440 'o' & -- LC_O_Diaeresis
441 'o' & -- LC_O_Oblique_Stroke
442 'u' & -- LC_U_Grave
443 'u' & -- LC_U_Acute
444 'u' & -- LC_U_Circumflex
445 'u' & -- LC_U_Diaeresis
446 'y' & -- LC_Y_Acute
447 'y'); -- LC_Y_Diaeresis
449 Basic_Map : constant Wide_Character_Mapping :=
450 (AF.Controlled with
451 Basic_Mapping'Unrestricted_Access);
453 end Ada.Strings.Wide_Maps.Wide_Constants;