OSDN Git Service

2011-10-16 Tristan Gingold <gingold@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / a-szmzco.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT RUN-TIME COMPONENTS                         --
4 --                                                                          --
5 --              ADA.STRINGS.WIDE_WIDE_MAPS.WIDE_WIDE_CONSTANTS              --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --          Copyright (C) 1992-2009 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 3,  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.                                     --
21 --                                                                          --
22 -- As a special exception under Section 7 of GPL version 3, you are granted --
23 -- additional permissions described in the GCC Runtime Library Exception,   --
24 -- version 3.1, as published by the Free Software Foundation.               --
25 --                                                                          --
26 -- You should have received a copy of the GNU General Public License and    --
27 -- a copy of the GCC Runtime Library Exception along with this program;     --
28 -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
29 -- <http://www.gnu.org/licenses/>.                                          --
30 --                                                                          --
31 -- GNAT was originally developed  by the GNAT team at  New York University. --
32 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
33 --                                                                          --
34 ------------------------------------------------------------------------------
35
36 with Ada.Characters.Wide_Wide_Latin_1;
37
38 package Ada.Strings.Wide_Wide_Maps.Wide_Wide_Constants is
39    pragma Preelaborate;
40
41    Control_Set           : constant Wide_Wide_Maps.Wide_Wide_Character_Set;
42    Graphic_Set           : constant Wide_Wide_Maps.Wide_Wide_Character_Set;
43    Letter_Set            : constant Wide_Wide_Maps.Wide_Wide_Character_Set;
44    Lower_Set             : constant Wide_Wide_Maps.Wide_Wide_Character_Set;
45    Upper_Set             : constant Wide_Wide_Maps.Wide_Wide_Character_Set;
46    Basic_Set             : constant Wide_Wide_Maps.Wide_Wide_Character_Set;
47    Decimal_Digit_Set     : constant Wide_Wide_Maps.Wide_Wide_Character_Set;
48    Hexadecimal_Digit_Set : constant Wide_Wide_Maps.Wide_Wide_Character_Set;
49    Alphanumeric_Set      : constant Wide_Wide_Maps.Wide_Wide_Character_Set;
50    Special_Graphic_Set   : constant Wide_Wide_Maps.Wide_Wide_Character_Set;
51    ISO_646_Set           : constant Wide_Wide_Maps.Wide_Wide_Character_Set;
52    Character_Set         : constant Wide_Wide_Maps.Wide_Wide_Character_Set;
53
54    Lower_Case_Map        : constant Wide_Wide_Maps.Wide_Wide_Character_Mapping;
55    --  Maps to lower case for letters, else identity
56
57    Upper_Case_Map        : constant Wide_Wide_Maps.Wide_Wide_Character_Mapping;
58    --  Maps to upper case for letters, else identity
59
60    Basic_Map             : constant Wide_Wide_Maps.Wide_Wide_Character_Mapping;
61    --  Maps to basic letter for letters, else identity
62
63 private
64    package W renames Ada.Characters.Wide_Wide_Latin_1;
65
66    subtype WC is Wide_Wide_Character;
67
68    Control_Ranges           : aliased constant Wide_Wide_Character_Ranges :=
69      ((W.NUL, W.US),
70       (W.DEL, W.APC));
71
72    Control_Set              : constant Wide_Wide_Character_Set :=
73      (AF.Controlled with
74       Control_Ranges'Unrestricted_Access);
75
76    Graphic_Ranges           : aliased constant Wide_Wide_Character_Ranges :=
77      ((W.Space,       W.Tilde),
78       (WC'Val (256), WC'Last));
79
80    Graphic_Set              : constant Wide_Wide_Character_Set :=
81      (AF.Controlled with
82       Graphic_Ranges'Unrestricted_Access);
83
84    Letter_Ranges            : aliased constant Wide_Wide_Character_Ranges :=
85      (('A',                   'Z'),
86       (W.LC_A,                W.LC_Z),
87       (W.UC_A_Grave,          W.UC_O_Diaeresis),
88       (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis),
89       (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis));
90
91    Letter_Set               : constant Wide_Wide_Character_Set :=
92      (AF.Controlled with
93       Letter_Ranges'Unrestricted_Access);
94
95    Lower_Ranges             : aliased constant Wide_Wide_Character_Ranges :=
96      (1 => (W.LC_A,                 W.LC_Z),
97       2 => (W.LC_German_Sharp_S,   W.LC_O_Diaeresis),
98       3 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis));
99
100    Lower_Set                : constant Wide_Wide_Character_Set :=
101      (AF.Controlled with
102       Lower_Ranges'Unrestricted_Access);
103
104    Upper_Ranges             : aliased constant Wide_Wide_Character_Ranges :=
105      (1 => ('A',                   'Z'),
106       2 => (W.UC_A_Grave,          W.UC_O_Diaeresis),
107       3 => (W.UC_O_Oblique_Stroke, W.UC_Icelandic_Thorn));
108
109    Upper_Set                : constant Wide_Wide_Character_Set :=
110      (AF.Controlled with
111       Upper_Ranges'Unrestricted_Access);
112
113    Basic_Ranges             : aliased constant Wide_Wide_Character_Ranges :=
114      (1 => ('A',                   'Z'),
115       2 => (W.LC_A,                W.LC_Z),
116       3 => (W.UC_AE_Diphthong,     W.UC_AE_Diphthong),
117       4 => (W.LC_AE_Diphthong,     W.LC_AE_Diphthong),
118       5 => (W.LC_German_Sharp_S,   W.LC_German_Sharp_S),
119       6 => (W.UC_Icelandic_Thorn,  W.UC_Icelandic_Thorn),
120       7 => (W.LC_Icelandic_Thorn,  W.LC_Icelandic_Thorn),
121       8 => (W.UC_Icelandic_Eth,    W.UC_Icelandic_Eth),
122       9 => (W.LC_Icelandic_Eth,    W.LC_Icelandic_Eth));
123
124    Basic_Set                : constant Wide_Wide_Character_Set :=
125      (AF.Controlled with
126       Basic_Ranges'Unrestricted_Access);
127
128    Decimal_Digit_Ranges     : aliased constant Wide_Wide_Character_Ranges :=
129      (1 => ('0', '9'));
130
131    Decimal_Digit_Set        : constant Wide_Wide_Character_Set :=
132      (AF.Controlled with
133       Decimal_Digit_Ranges'Unrestricted_Access);
134
135    Hexadecimal_Digit_Ranges : aliased constant Wide_Wide_Character_Ranges :=
136      (1 => ('0', '9'),
137       2 => ('A', 'F'),
138       3 => (W.LC_A, W.LC_F));
139
140    Hexadecimal_Digit_Set    : constant Wide_Wide_Character_Set :=
141      (AF.Controlled with
142       Hexadecimal_Digit_Ranges'Unrestricted_Access);
143
144    Alphanumeric_Ranges      : aliased constant Wide_Wide_Character_Ranges :=
145      (1 => ('0',                   '9'),
146       2 => ('A',                   'Z'),
147       3 => (W.LC_A,                W.LC_Z),
148       4 => (W.UC_A_Grave,          W.UC_O_Diaeresis),
149       5 => (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis),
150       6 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis));
151
152    Alphanumeric_Set         : constant Wide_Wide_Character_Set :=
153      (AF.Controlled with
154       Alphanumeric_Ranges'Unrestricted_Access);
155
156    Special_Graphic_Ranges   : aliased constant Wide_Wide_Character_Ranges :=
157      (1 => (Wide_Wide_Space,            W.Solidus),
158       2 => (W.Colon,               W.Commercial_At),
159       3 => (W.Left_Square_Bracket, W.Grave),
160       4 => (W.Left_Curly_Bracket,  W.Tilde),
161       5 => (W.No_Break_Space,      W.Inverted_Question),
162       6 => (W.Multiplication_Sign, W.Multiplication_Sign),
163       7 => (W.Division_Sign,       W.Division_Sign));
164
165    Special_Graphic_Set      : constant Wide_Wide_Character_Set :=
166      (AF.Controlled with
167       Special_Graphic_Ranges'Unrestricted_Access);
168
169    ISO_646_Ranges           : aliased constant Wide_Wide_Character_Ranges :=
170      (1 => (W.NUL, W.DEL));
171
172    ISO_646_Set              : constant Wide_Wide_Character_Set :=
173      (AF.Controlled with
174       ISO_646_Ranges'Unrestricted_Access);
175
176    Character_Ranges         : aliased constant Wide_Wide_Character_Ranges :=
177      (1 => (W.NUL, WC'Val (255)));
178
179    Character_Set            : constant Wide_Wide_Character_Set :=
180      (AF.Controlled with
181       Character_Ranges'Unrestricted_Access);
182
183    Lower_Case_Mapping : aliased constant Wide_Wide_Character_Mapping_Values :=
184      (Length => 56,
185
186       Domain =>
187         "ABCDEFGHIJKLMNOPQRSTUVWXYZ" &
188          W.UC_A_Grave                &
189          W.UC_A_Acute                &
190          W.UC_A_Circumflex           &
191          W.UC_A_Tilde                &
192          W.UC_A_Diaeresis            &
193          W.UC_A_Ring                 &
194          W.UC_AE_Diphthong           &
195          W.UC_C_Cedilla              &
196          W.UC_E_Grave                &
197          W.UC_E_Acute                &
198          W.UC_E_Circumflex           &
199          W.UC_E_Diaeresis            &
200          W.UC_I_Grave                &
201          W.UC_I_Acute                &
202          W.UC_I_Circumflex           &
203          W.UC_I_Diaeresis            &
204          W.UC_Icelandic_Eth          &
205          W.UC_N_Tilde                &
206          W.UC_O_Grave                &
207          W.UC_O_Acute                &
208          W.UC_O_Circumflex           &
209          W.UC_O_Tilde                &
210          W.UC_O_Diaeresis            &
211          W.UC_O_Oblique_Stroke       &
212          W.UC_U_Grave                &
213          W.UC_U_Acute                &
214          W.UC_U_Circumflex           &
215          W.UC_U_Diaeresis            &
216          W.UC_Y_Acute                &
217          W.UC_Icelandic_Thorn,
218
219       Rangev =>
220         "abcdefghijklmnopqrstuvwxyz" &
221          W.LC_A_Grave                &
222          W.LC_A_Acute                &
223          W.LC_A_Circumflex           &
224          W.LC_A_Tilde                &
225          W.LC_A_Diaeresis            &
226          W.LC_A_Ring                 &
227          W.LC_AE_Diphthong           &
228          W.LC_C_Cedilla              &
229          W.LC_E_Grave                &
230          W.LC_E_Acute                &
231          W.LC_E_Circumflex           &
232          W.LC_E_Diaeresis            &
233          W.LC_I_Grave                &
234          W.LC_I_Acute                &
235          W.LC_I_Circumflex           &
236          W.LC_I_Diaeresis            &
237          W.LC_Icelandic_Eth          &
238          W.LC_N_Tilde                &
239          W.LC_O_Grave                &
240          W.LC_O_Acute                &
241          W.LC_O_Circumflex           &
242          W.LC_O_Tilde                &
243          W.LC_O_Diaeresis            &
244          W.LC_O_Oblique_Stroke       &
245          W.LC_U_Grave                &
246          W.LC_U_Acute                &
247          W.LC_U_Circumflex           &
248          W.LC_U_Diaeresis            &
249          W.LC_Y_Acute                &
250          W.LC_Icelandic_Thorn);
251
252    Lower_Case_Map : constant Wide_Wide_Character_Mapping :=
253      (AF.Controlled with
254       Map => Lower_Case_Mapping'Unrestricted_Access);
255
256    Upper_Case_Mapping : aliased constant Wide_Wide_Character_Mapping_Values :=
257      (Length => 56,
258
259       Domain =>
260         "abcdefghijklmnopqrstuvwxyz" &
261          W.LC_A_Grave                &
262          W.LC_A_Acute                &
263          W.LC_A_Circumflex           &
264          W.LC_A_Tilde                &
265          W.LC_A_Diaeresis            &
266          W.LC_A_Ring                 &
267          W.LC_AE_Diphthong           &
268          W.LC_C_Cedilla              &
269          W.LC_E_Grave                &
270          W.LC_E_Acute                &
271          W.LC_E_Circumflex           &
272          W.LC_E_Diaeresis            &
273          W.LC_I_Grave                &
274          W.LC_I_Acute                &
275          W.LC_I_Circumflex           &
276          W.LC_I_Diaeresis            &
277          W.LC_Icelandic_Eth          &
278          W.LC_N_Tilde                &
279          W.LC_O_Grave                &
280          W.LC_O_Acute                &
281          W.LC_O_Circumflex           &
282          W.LC_O_Tilde                &
283          W.LC_O_Diaeresis            &
284          W.LC_O_Oblique_Stroke       &
285          W.LC_U_Grave                &
286          W.LC_U_Acute                &
287          W.LC_U_Circumflex           &
288          W.LC_U_Diaeresis            &
289          W.LC_Y_Acute                &
290          W.LC_Icelandic_Thorn,
291
292       Rangev =>
293         "ABCDEFGHIJKLMNOPQRSTUVWXYZ" &
294          W.UC_A_Grave                &
295          W.UC_A_Acute                &
296          W.UC_A_Circumflex           &
297          W.UC_A_Tilde                &
298          W.UC_A_Diaeresis            &
299          W.UC_A_Ring                 &
300          W.UC_AE_Diphthong           &
301          W.UC_C_Cedilla              &
302          W.UC_E_Grave                &
303          W.UC_E_Acute                &
304          W.UC_E_Circumflex           &
305          W.UC_E_Diaeresis            &
306          W.UC_I_Grave                &
307          W.UC_I_Acute                &
308          W.UC_I_Circumflex           &
309          W.UC_I_Diaeresis            &
310          W.UC_Icelandic_Eth          &
311          W.UC_N_Tilde                &
312          W.UC_O_Grave                &
313          W.UC_O_Acute                &
314          W.UC_O_Circumflex           &
315          W.UC_O_Tilde                &
316          W.UC_O_Diaeresis            &
317          W.UC_O_Oblique_Stroke       &
318          W.UC_U_Grave                &
319          W.UC_U_Acute                &
320          W.UC_U_Circumflex           &
321          W.UC_U_Diaeresis            &
322          W.UC_Y_Acute                &
323          W.UC_Icelandic_Thorn);
324
325    Upper_Case_Map : constant Wide_Wide_Character_Mapping :=
326      (AF.Controlled with
327       Upper_Case_Mapping'Unrestricted_Access);
328
329    Basic_Mapping : aliased constant Wide_Wide_Character_Mapping_Values :=
330      (Length => 55,
331
332       Domain =>
333         W.UC_A_Grave          &
334         W.UC_A_Acute          &
335         W.UC_A_Circumflex     &
336         W.UC_A_Tilde          &
337         W.UC_A_Diaeresis      &
338         W.UC_A_Ring           &
339         W.UC_C_Cedilla        &
340         W.UC_E_Grave          &
341         W.UC_E_Acute          &
342         W.UC_E_Circumflex     &
343         W.UC_E_Diaeresis      &
344         W.UC_I_Grave          &
345         W.UC_I_Acute          &
346         W.UC_I_Circumflex     &
347         W.UC_I_Diaeresis      &
348         W.UC_N_Tilde          &
349         W.UC_O_Grave          &
350         W.UC_O_Acute          &
351         W.UC_O_Circumflex     &
352         W.UC_O_Tilde          &
353         W.UC_O_Diaeresis      &
354         W.UC_O_Oblique_Stroke &
355         W.UC_U_Grave          &
356         W.UC_U_Acute          &
357         W.UC_U_Circumflex     &
358         W.UC_U_Diaeresis      &
359         W.UC_Y_Acute          &
360         W.LC_A_Grave          &
361         W.LC_A_Acute          &
362         W.LC_A_Circumflex     &
363         W.LC_A_Tilde          &
364         W.LC_A_Diaeresis      &
365         W.LC_A_Ring           &
366         W.LC_C_Cedilla        &
367         W.LC_E_Grave          &
368         W.LC_E_Acute          &
369         W.LC_E_Circumflex     &
370         W.LC_E_Diaeresis      &
371         W.LC_I_Grave          &
372         W.LC_I_Acute          &
373         W.LC_I_Circumflex     &
374         W.LC_I_Diaeresis      &
375         W.LC_N_Tilde          &
376         W.LC_O_Grave          &
377         W.LC_O_Acute          &
378         W.LC_O_Circumflex     &
379         W.LC_O_Tilde          &
380         W.LC_O_Diaeresis      &
381         W.LC_O_Oblique_Stroke &
382         W.LC_U_Grave          &
383         W.LC_U_Acute          &
384         W.LC_U_Circumflex     &
385         W.LC_U_Diaeresis      &
386         W.LC_Y_Acute          &
387         W.LC_Y_Diaeresis,
388
389       Rangev =>
390         'A'        &  -- UC_A_Grave
391         'A'        &  -- UC_A_Acute
392         'A'        &  -- UC_A_Circumflex
393         'A'        &  -- UC_A_Tilde
394         'A'        &  -- UC_A_Diaeresis
395         'A'        &  -- UC_A_Ring
396         'C'        &  -- UC_C_Cedilla
397         'E'        &  -- UC_E_Grave
398         'E'        &  -- UC_E_Acute
399         'E'        &  -- UC_E_Circumflex
400         'E'        &  -- UC_E_Diaeresis
401         'I'        &  -- UC_I_Grave
402         'I'        &  -- UC_I_Acute
403         'I'        &  -- UC_I_Circumflex
404         'I'        &  -- UC_I_Diaeresis
405         'N'        &  -- UC_N_Tilde
406         'O'        &  -- UC_O_Grave
407         'O'        &  -- UC_O_Acute
408         'O'        &  -- UC_O_Circumflex
409         'O'        &  -- UC_O_Tilde
410         'O'        &  -- UC_O_Diaeresis
411         'O'        &  -- UC_O_Oblique_Stroke
412         'U'        &  -- UC_U_Grave
413         'U'        &  -- UC_U_Acute
414         'U'        &  -- UC_U_Circumflex
415         'U'        &  -- UC_U_Diaeresis
416         'Y'        &  -- UC_Y_Acute
417         'a'        &  -- LC_A_Grave
418         'a'        &  -- LC_A_Acute
419         'a'        &  -- LC_A_Circumflex
420         'a'        &  -- LC_A_Tilde
421         'a'        &  -- LC_A_Diaeresis
422         'a'        &  -- LC_A_Ring
423         'c'        &  -- LC_C_Cedilla
424         'e'        &  -- LC_E_Grave
425         'e'        &  -- LC_E_Acute
426         'e'        &  -- LC_E_Circumflex
427         'e'        &  -- LC_E_Diaeresis
428         'i'        &  -- LC_I_Grave
429         'i'        &  -- LC_I_Acute
430         'i'        &  -- LC_I_Circumflex
431         'i'        &  -- LC_I_Diaeresis
432         'n'        &  -- LC_N_Tilde
433         'o'        &  -- LC_O_Grave
434         'o'        &  -- LC_O_Acute
435         'o'        &  -- LC_O_Circumflex
436         'o'        &  -- LC_O_Tilde
437         'o'        &  -- LC_O_Diaeresis
438         'o'        &  -- LC_O_Oblique_Stroke
439         'u'        &  -- LC_U_Grave
440         'u'        &  -- LC_U_Acute
441         'u'        &  -- LC_U_Circumflex
442         'u'        &  -- LC_U_Diaeresis
443         'y'        &  -- LC_Y_Acute
444         'y');         -- LC_Y_Diaeresis
445
446    Basic_Map : constant Wide_Wide_Character_Mapping :=
447      (AF.Controlled with
448       Basic_Mapping'Unrestricted_Access);
449
450 end Ada.Strings.Wide_Wide_Maps.Wide_Wide_Constants;