Fix ICE in lto_symtab_merge_symbols_1 (PR lto/88004).
[official-gcc.git] / gcc / ada / csets.adb
bloba5ae0a0c9425d1b1ace87a545477f8920954314c
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- C S E T S --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1992-2018, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
17 -- --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
30 ------------------------------------------------------------------------------
32 with Opt; use Opt;
34 with System.WCh_Con; use System.WCh_Con;
36 package body Csets is
38 X_80 : constant Character := Character'Val (16#80#);
39 X_81 : constant Character := Character'Val (16#81#);
40 X_82 : constant Character := Character'Val (16#82#);
41 X_83 : constant Character := Character'Val (16#83#);
42 X_84 : constant Character := Character'Val (16#84#);
43 X_85 : constant Character := Character'Val (16#85#);
44 X_86 : constant Character := Character'Val (16#86#);
45 X_87 : constant Character := Character'Val (16#87#);
46 X_88 : constant Character := Character'Val (16#88#);
47 X_89 : constant Character := Character'Val (16#89#);
48 X_8A : constant Character := Character'Val (16#8A#);
49 X_8B : constant Character := Character'Val (16#8B#);
50 X_8C : constant Character := Character'Val (16#8C#);
51 X_8D : constant Character := Character'Val (16#8D#);
52 X_8E : constant Character := Character'Val (16#8E#);
53 X_8F : constant Character := Character'Val (16#8F#);
54 X_90 : constant Character := Character'Val (16#90#);
55 X_91 : constant Character := Character'Val (16#91#);
56 X_92 : constant Character := Character'Val (16#92#);
57 X_93 : constant Character := Character'Val (16#93#);
58 X_94 : constant Character := Character'Val (16#94#);
59 X_95 : constant Character := Character'Val (16#95#);
60 X_96 : constant Character := Character'Val (16#96#);
61 X_97 : constant Character := Character'Val (16#97#);
62 X_98 : constant Character := Character'Val (16#98#);
63 X_99 : constant Character := Character'Val (16#99#);
64 X_9A : constant Character := Character'Val (16#9A#);
65 X_9B : constant Character := Character'Val (16#9B#);
66 X_9C : constant Character := Character'Val (16#9C#);
67 X_9D : constant Character := Character'Val (16#9D#);
68 X_9E : constant Character := Character'Val (16#9E#);
69 X_9F : constant Character := Character'Val (16#9F#);
70 X_A0 : constant Character := Character'Val (16#A0#);
71 X_A1 : constant Character := Character'Val (16#A1#);
72 X_A2 : constant Character := Character'Val (16#A2#);
73 X_A3 : constant Character := Character'Val (16#A3#);
74 X_A4 : constant Character := Character'Val (16#A4#);
75 X_A5 : constant Character := Character'Val (16#A5#);
76 X_A6 : constant Character := Character'Val (16#A6#);
77 X_A7 : constant Character := Character'Val (16#A7#);
78 X_A8 : constant Character := Character'Val (16#A8#);
79 X_A9 : constant Character := Character'Val (16#A9#);
80 X_AA : constant Character := Character'Val (16#AA#);
81 X_AB : constant Character := Character'Val (16#AB#);
82 X_AC : constant Character := Character'Val (16#AC#);
83 X_AD : constant Character := Character'Val (16#AD#);
84 X_AE : constant Character := Character'Val (16#AE#);
85 X_AF : constant Character := Character'Val (16#AF#);
86 X_B0 : constant Character := Character'Val (16#B0#);
87 X_B1 : constant Character := Character'Val (16#B1#);
88 X_B2 : constant Character := Character'Val (16#B2#);
89 X_B3 : constant Character := Character'Val (16#B3#);
90 X_B4 : constant Character := Character'Val (16#B4#);
91 X_B5 : constant Character := Character'Val (16#B5#);
92 X_B6 : constant Character := Character'Val (16#B6#);
93 X_B7 : constant Character := Character'Val (16#B7#);
94 X_B8 : constant Character := Character'Val (16#B8#);
95 X_B9 : constant Character := Character'Val (16#B9#);
96 X_BA : constant Character := Character'Val (16#BA#);
97 X_BB : constant Character := Character'Val (16#BB#);
98 X_BC : constant Character := Character'Val (16#BC#);
99 X_BD : constant Character := Character'Val (16#BD#);
100 X_BE : constant Character := Character'Val (16#BE#);
101 X_BF : constant Character := Character'Val (16#BF#);
102 X_C0 : constant Character := Character'Val (16#C0#);
103 X_C1 : constant Character := Character'Val (16#C1#);
104 X_C2 : constant Character := Character'Val (16#C2#);
105 X_C3 : constant Character := Character'Val (16#C3#);
106 X_C4 : constant Character := Character'Val (16#C4#);
107 X_C5 : constant Character := Character'Val (16#C5#);
108 X_C6 : constant Character := Character'Val (16#C6#);
109 X_C7 : constant Character := Character'Val (16#C7#);
110 X_C8 : constant Character := Character'Val (16#C8#);
111 X_C9 : constant Character := Character'Val (16#C9#);
112 X_CA : constant Character := Character'Val (16#CA#);
113 X_CB : constant Character := Character'Val (16#CB#);
114 X_CC : constant Character := Character'Val (16#CC#);
115 X_CD : constant Character := Character'Val (16#CD#);
116 X_CE : constant Character := Character'Val (16#CE#);
117 X_CF : constant Character := Character'Val (16#CF#);
118 X_D0 : constant Character := Character'Val (16#D0#);
119 X_D1 : constant Character := Character'Val (16#D1#);
120 X_D2 : constant Character := Character'Val (16#D2#);
121 X_D3 : constant Character := Character'Val (16#D3#);
122 X_D4 : constant Character := Character'Val (16#D4#);
123 X_D5 : constant Character := Character'Val (16#D5#);
124 X_D6 : constant Character := Character'Val (16#D6#);
125 X_D7 : constant Character := Character'Val (16#D7#);
126 X_D8 : constant Character := Character'Val (16#D8#);
127 X_D9 : constant Character := Character'Val (16#D9#);
128 X_DA : constant Character := Character'Val (16#DA#);
129 X_DB : constant Character := Character'Val (16#DB#);
130 X_DC : constant Character := Character'Val (16#DC#);
131 X_DD : constant Character := Character'Val (16#DD#);
132 X_DE : constant Character := Character'Val (16#DE#);
133 X_DF : constant Character := Character'Val (16#DF#);
134 X_E0 : constant Character := Character'Val (16#E0#);
135 X_E1 : constant Character := Character'Val (16#E1#);
136 X_E2 : constant Character := Character'Val (16#E2#);
137 X_E3 : constant Character := Character'Val (16#E3#);
138 X_E4 : constant Character := Character'Val (16#E4#);
139 X_E5 : constant Character := Character'Val (16#E5#);
140 X_E6 : constant Character := Character'Val (16#E6#);
141 X_E7 : constant Character := Character'Val (16#E7#);
142 X_E8 : constant Character := Character'Val (16#E8#);
143 X_E9 : constant Character := Character'Val (16#E9#);
144 X_EA : constant Character := Character'Val (16#EA#);
145 X_EB : constant Character := Character'Val (16#EB#);
146 X_EC : constant Character := Character'Val (16#EC#);
147 X_ED : constant Character := Character'Val (16#ED#);
148 X_EE : constant Character := Character'Val (16#EE#);
149 X_EF : constant Character := Character'Val (16#EF#);
150 X_F0 : constant Character := Character'Val (16#F0#);
151 X_F1 : constant Character := Character'Val (16#F1#);
152 X_F2 : constant Character := Character'Val (16#F2#);
153 X_F3 : constant Character := Character'Val (16#F3#);
154 X_F4 : constant Character := Character'Val (16#F4#);
155 X_F5 : constant Character := Character'Val (16#F5#);
156 X_F6 : constant Character := Character'Val (16#F6#);
157 X_F7 : constant Character := Character'Val (16#F7#);
158 X_F8 : constant Character := Character'Val (16#F8#);
159 X_F9 : constant Character := Character'Val (16#F9#);
160 X_FA : constant Character := Character'Val (16#FA#);
161 X_FB : constant Character := Character'Val (16#FB#);
162 X_FC : constant Character := Character'Val (16#FC#);
163 X_FD : constant Character := Character'Val (16#FD#);
164 X_FE : constant Character := Character'Val (16#FE#);
165 X_FF : constant Character := Character'Val (16#FF#);
167 ------------------------------------------
168 -- Definitions for Latin-1 (ISO 8859-1) --
169 ------------------------------------------
171 Fold_Latin_1 : constant Translate_Table := Translate_Table'(
173 'a' => 'A', X_E0 => X_C0, X_F0 => X_D0,
174 'b' => 'B', X_E1 => X_C1, X_F1 => X_D1,
175 'c' => 'C', X_E2 => X_C2, X_F2 => X_D2,
176 'd' => 'D', X_E3 => X_C3, X_F3 => X_D3,
177 'e' => 'E', X_E4 => X_C4, X_F4 => X_D4,
178 'f' => 'F', X_E5 => X_C5, X_F5 => X_D5,
179 'g' => 'G', X_E6 => X_C6, X_F6 => X_D6,
180 'h' => 'H', X_E7 => X_C7,
181 'i' => 'I', X_E8 => X_C8, X_F8 => X_D8,
182 'j' => 'J', X_E9 => X_C9, X_F9 => X_D9,
183 'k' => 'K', X_EA => X_CA, X_FA => X_DA,
184 'l' => 'L', X_EB => X_CB, X_FB => X_DB,
185 'm' => 'M', X_EC => X_CC, X_FC => X_DC,
186 'n' => 'N', X_ED => X_CD, X_FD => X_DD,
187 'o' => 'O', X_EE => X_CE, X_FE => X_DE,
188 'p' => 'P', X_EF => X_CF,
189 'q' => 'Q',
190 'r' => 'R',
191 's' => 'S',
192 't' => 'T',
193 'u' => 'U',
194 'v' => 'V',
195 'w' => 'W',
196 'x' => 'X',
197 'y' => 'Y',
198 'z' => 'Z',
200 'A' => 'A', X_C0 => X_C0, X_D0 => X_D0,
201 'B' => 'B', X_C1 => X_C1, X_D1 => X_D1,
202 'C' => 'C', X_C2 => X_C2, X_D2 => X_D2,
203 'D' => 'D', X_C3 => X_C3, X_D3 => X_D3,
204 'E' => 'E', X_C4 => X_C4, X_D4 => X_D4,
205 'F' => 'F', X_C5 => X_C5, X_D5 => X_D5,
206 'G' => 'G', X_C6 => X_C6, X_D6 => X_D6,
207 'H' => 'H', X_C7 => X_C7,
208 'I' => 'I', X_C8 => X_C8, X_D8 => X_D8,
209 'J' => 'J', X_C9 => X_C9, X_D9 => X_D9,
210 'K' => 'K', X_CA => X_CA, X_DA => X_DA,
211 'L' => 'L', X_CB => X_CB, X_DB => X_DB,
212 'M' => 'M', X_CC => X_CC, X_DC => X_DC,
213 'N' => 'N', X_CD => X_CD, X_DD => X_DD,
214 'O' => 'O', X_CE => X_CE, X_DE => X_DE,
215 'P' => 'P', X_CF => X_CF, X_DF => X_DF, X_FF => X_FF,
216 'Q' => 'Q',
217 'R' => 'R',
218 'S' => 'S',
219 'T' => 'T',
220 'U' => 'U',
221 'V' => 'V',
222 'W' => 'W',
223 'X' => 'X',
224 'Y' => 'Y',
225 'Z' => 'Z',
227 '0' => '0',
228 '1' => '1',
229 '2' => '2',
230 '3' => '3',
231 '4' => '4',
232 '5' => '5',
233 '6' => '6',
234 '7' => '7',
235 '8' => '8',
236 '9' => '9',
238 '_' => '_',
240 others => ' ');
242 ------------------------------------------
243 -- Definitions for Latin-2 (ISO 8859-2) --
244 ------------------------------------------
246 Fold_Latin_2 : constant Translate_Table := Translate_Table'(
248 'a' => 'A', X_E0 => X_C0, X_F0 => X_D0,
249 'b' => 'B', X_E1 => X_C1, X_F1 => X_D1, X_B1 => X_A1,
250 'c' => 'C', X_E2 => X_C2, X_F2 => X_D2,
251 'd' => 'D', X_E3 => X_C3, X_F3 => X_D3, X_B3 => X_A3,
252 'e' => 'E', X_E4 => X_C4, X_F4 => X_D4,
253 'f' => 'F', X_E5 => X_C5, X_F5 => X_D5, X_B5 => X_A5,
254 'g' => 'G', X_E6 => X_C6, X_F6 => X_D6, X_B6 => X_A6,
255 'h' => 'H', X_E7 => X_C7,
256 'i' => 'I', X_E8 => X_C8, X_F8 => X_D8,
257 'j' => 'J', X_E9 => X_C9, X_F9 => X_D9, X_B9 => X_A9,
258 'k' => 'K', X_EA => X_CA, X_FA => X_DA, X_BA => X_AA,
259 'l' => 'L', X_EB => X_CB, X_FB => X_DB, X_BB => X_AB,
260 'm' => 'M', X_EC => X_CC, X_FC => X_DC, X_BC => X_AC,
261 'n' => 'N', X_ED => X_CD, X_FD => X_DD,
262 'o' => 'O', X_EE => X_CE, X_FE => X_DE, X_BE => X_AE,
263 'p' => 'P', X_EF => X_CF, X_FF => X_DF, X_BF => X_AF,
264 'q' => 'Q',
265 'r' => 'R',
266 's' => 'S',
267 't' => 'T',
268 'u' => 'U',
269 'v' => 'V',
270 'w' => 'W',
271 'x' => 'X',
272 'y' => 'Y',
273 'z' => 'Z',
275 'A' => 'A', X_C0 => X_C0, X_D0 => X_D0,
276 'B' => 'B', X_C1 => X_C1, X_D1 => X_D1, X_A1 => X_A1,
277 'C' => 'C', X_C2 => X_C2, X_D2 => X_D2,
278 'D' => 'D', X_C3 => X_C3, X_D3 => X_D3, X_A3 => X_A3,
279 'E' => 'E', X_C4 => X_C4, X_D4 => X_D4,
280 'F' => 'F', X_C5 => X_C5, X_D5 => X_D5, X_A5 => X_A5,
281 'G' => 'G', X_C6 => X_C6, X_D6 => X_D6, X_A6 => X_A6,
282 'H' => 'H', X_C7 => X_C7,
283 'I' => 'I', X_C8 => X_C8, X_D8 => X_D8,
284 'J' => 'J', X_C9 => X_C9, X_D9 => X_D9, X_A9 => X_A9,
285 'K' => 'K', X_CA => X_CA, X_DA => X_DA, X_AA => X_AA,
286 'L' => 'L', X_CB => X_CB, X_DB => X_DB, X_AB => X_AB,
287 'M' => 'M', X_CC => X_CC, X_DC => X_DC, X_AC => X_AC,
288 'N' => 'N', X_CD => X_CD, X_DD => X_DD,
289 'O' => 'O', X_CE => X_CE, X_DE => X_DE, X_AE => X_AE,
290 'P' => 'P', X_CF => X_CF, X_DF => X_DF, X_AF => X_AF,
291 'Q' => 'Q',
292 'R' => 'R',
293 'S' => 'S',
294 'T' => 'T',
295 'U' => 'U',
296 'V' => 'V',
297 'W' => 'W',
298 'X' => 'X',
299 'Y' => 'Y',
300 'Z' => 'Z',
302 '0' => '0',
303 '1' => '1',
304 '2' => '2',
305 '3' => '3',
306 '4' => '4',
307 '5' => '5',
308 '6' => '6',
309 '7' => '7',
310 '8' => '8',
311 '9' => '9',
313 '_' => '_',
315 others => ' ');
317 ------------------------------------------
318 -- Definitions for Latin-3 (ISO 8859-3) --
319 ------------------------------------------
321 Fold_Latin_3 : constant Translate_Table := Translate_Table'(
323 'a' => 'A', X_E0 => X_C0,
324 'b' => 'B', X_E1 => X_C1, X_F1 => X_D1, X_B1 => X_A1,
325 'c' => 'C', X_E2 => X_C2, X_F2 => X_D2,
326 'd' => 'D', X_F3 => X_D3,
327 'e' => 'E', X_E4 => X_C4, X_F4 => X_D4,
328 'f' => 'F', X_E5 => X_C5, X_F5 => X_D5, X_B5 => X_A5,
329 'g' => 'G', X_E6 => X_C6, X_F6 => X_D6, X_B6 => X_A6,
330 'h' => 'H', X_E7 => X_C7,
331 'i' => 'I', X_E8 => X_C8, X_F8 => X_D8,
332 'j' => 'J', X_E9 => X_C9, X_F9 => X_D9, X_B9 => X_A9,
333 'k' => 'K', X_EA => X_CA, X_FA => X_DA, X_BA => X_AA,
334 'l' => 'L', X_EB => X_CB, X_FB => X_DB, X_BB => X_AB,
335 'm' => 'M', X_EC => X_CC, X_FC => X_DC, X_BC => X_AC,
336 'n' => 'N', X_ED => X_CD, X_FD => X_DD,
337 'o' => 'O', X_EE => X_CE, X_FE => X_DE,
338 'p' => 'P', X_EF => X_CF, X_BF => X_AF,
339 'q' => 'Q',
340 'r' => 'R',
341 's' => 'S',
342 't' => 'T',
343 'u' => 'U',
344 'v' => 'V',
345 'w' => 'W',
346 'x' => 'X',
347 'y' => 'Y',
348 'z' => 'Z',
350 'A' => 'A', X_C0 => X_C0,
351 'B' => 'B', X_C1 => X_C1, X_D1 => X_D1, X_A1 => X_A1,
352 'C' => 'C', X_C2 => X_C2, X_D2 => X_D2,
353 'D' => 'D', X_D3 => X_D3,
354 'E' => 'E', X_C4 => X_C4, X_D4 => X_D4,
355 'F' => 'F', X_C5 => X_C5, X_D5 => X_D5, X_A5 => X_A5,
356 'G' => 'G', X_C6 => X_C6, X_D6 => X_D6, X_A6 => X_A6,
357 'H' => 'H', X_C7 => X_C7,
358 'I' => 'I', X_C8 => X_C8, X_D8 => X_D8,
359 'J' => 'J', X_C9 => X_C9, X_D9 => X_D9, X_A9 => X_A9,
360 'K' => 'K', X_CA => X_CA, X_DA => X_DA, X_AA => X_AA,
361 'L' => 'L', X_CB => X_CB, X_DB => X_DB, X_AB => X_AB,
362 'M' => 'M', X_CC => X_CC, X_DC => X_DC, X_AC => X_AC,
363 'N' => 'N', X_CD => X_CD, X_DD => X_DD,
364 'O' => 'O', X_CE => X_CE, X_DE => X_DE,
365 'P' => 'P', X_CF => X_CF, X_AF => X_AF,
366 'Q' => 'Q',
367 'R' => 'R',
368 'S' => 'S',
369 'T' => 'T',
370 'U' => 'U',
371 'V' => 'V',
372 'W' => 'W',
373 'X' => 'X',
374 'Y' => 'Y',
375 'Z' => 'Z',
377 '0' => '0',
378 '1' => '1',
379 '2' => '2',
380 '3' => '3',
381 '4' => '4',
382 '5' => '5',
383 '6' => '6',
384 '7' => '7',
385 '8' => '8',
386 '9' => '9',
388 '_' => '_',
390 others => ' ');
392 ------------------------------------------
393 -- Definitions for Latin-4 (ISO 8859-4) --
394 ------------------------------------------
396 Fold_Latin_4 : constant Translate_Table := Translate_Table'(
398 'a' => 'A', X_E0 => X_C0, X_F0 => X_D0,
399 'b' => 'B', X_E1 => X_C1, X_F1 => X_D1, X_B1 => X_A1,
400 'c' => 'C', X_E2 => X_C2, X_F2 => X_D2,
401 'd' => 'D', X_E3 => X_C3, X_F3 => X_D3, X_B3 => X_A3,
402 'e' => 'E', X_E4 => X_C4, X_F4 => X_D4,
403 'f' => 'F', X_E5 => X_C5, X_F5 => X_D5, X_B5 => X_A5,
404 'g' => 'G', X_E6 => X_C6, X_F6 => X_D6, X_B6 => X_A6,
405 'h' => 'H', X_E7 => X_C7,
406 'i' => 'I', X_E8 => X_C8, X_F8 => X_D8,
407 'j' => 'J', X_E9 => X_C9, X_F9 => X_D9, X_B9 => X_A9,
408 'k' => 'K', X_EA => X_CA, X_FA => X_DA, X_BA => X_AA,
409 'l' => 'L', X_EB => X_CB, X_FB => X_DB, X_BB => X_AB,
410 'm' => 'M', X_EC => X_CC, X_FC => X_DC, X_BC => X_AC,
411 'n' => 'N', X_ED => X_CD, X_FD => X_DD,
412 'o' => 'O', X_EE => X_CE, X_FE => X_DE, X_BE => X_AE,
413 'p' => 'P', X_EF => X_CF,
414 'q' => 'Q',
415 'r' => 'R',
416 's' => 'S',
417 't' => 'T',
418 'u' => 'U',
419 'v' => 'V',
420 'w' => 'W',
421 'x' => 'X',
422 'y' => 'Y',
423 'z' => 'Z',
425 'A' => 'A', X_C0 => X_C0, X_D0 => X_D0,
426 'B' => 'B', X_C1 => X_C1, X_D1 => X_D1, X_A1 => X_A1,
427 'C' => 'C', X_C2 => X_C2, X_D2 => X_D2,
428 'D' => 'D', X_C3 => X_C3, X_D3 => X_D3, X_A3 => X_A3,
429 'E' => 'E', X_C4 => X_C4, X_D4 => X_D4,
430 'F' => 'F', X_C5 => X_C5, X_D5 => X_D5, X_A5 => X_A5,
431 'G' => 'G', X_C6 => X_C6, X_D6 => X_D6, X_A6 => X_A6,
432 'H' => 'H', X_C7 => X_C7,
433 'I' => 'I', X_C8 => X_C8, X_D8 => X_D8,
434 'J' => 'J', X_C9 => X_C9, X_D9 => X_D9, X_A9 => X_A9,
435 'K' => 'K', X_CA => X_CA, X_DA => X_DA, X_AA => X_AA,
436 'L' => 'L', X_CB => X_CB, X_DB => X_DB, X_AB => X_AB,
437 'M' => 'M', X_CC => X_CC, X_DC => X_DC, X_AC => X_AC,
438 'N' => 'N', X_CD => X_CD, X_DD => X_DD,
439 'O' => 'O', X_CE => X_CE, X_DE => X_DE, X_AE => X_AE,
440 'P' => 'P', X_CF => X_CF,
441 'Q' => 'Q',
442 'R' => 'R',
443 'S' => 'S',
444 'T' => 'T',
445 'U' => 'U',
446 'V' => 'V',
447 'W' => 'W',
448 'X' => 'X',
449 'Y' => 'Y',
450 'Z' => 'Z',
452 '0' => '0',
453 '1' => '1',
454 '2' => '2',
455 '3' => '3',
456 '4' => '4',
457 '5' => '5',
458 '6' => '6',
459 '7' => '7',
460 '8' => '8',
461 '9' => '9',
463 '_' => '_',
465 others => ' ');
467 -------------------------------------------
468 -- Definitions for Cyrillic (ISO-8859-5) --
469 -------------------------------------------
471 Fold_Cyrillic : constant Translate_Table := Translate_Table'(
473 'a' => 'A', X_D0 => X_B0, X_E0 => X_C0,
474 'b' => 'B', X_D1 => X_B1, X_E1 => X_C1, X_F1 => X_A1,
475 'c' => 'C', X_D2 => X_B2, X_E2 => X_C2, X_F2 => X_A2,
476 'd' => 'D', X_D3 => X_B3, X_E3 => X_C3, X_F3 => X_A3,
477 'e' => 'E', X_D4 => X_B4, X_E4 => X_C4, X_F4 => X_A4,
478 'f' => 'F', X_D5 => X_B5, X_E5 => X_C5, X_F5 => X_A5,
479 'g' => 'G', X_D6 => X_B6, X_E6 => X_C6, X_F6 => X_A6,
480 'h' => 'H', X_D7 => X_B7, X_E7 => X_C7, X_F7 => X_A7,
481 'i' => 'I', X_D8 => X_B8, X_E8 => X_C8, X_F8 => X_A8,
482 'j' => 'J', X_D9 => X_B9, X_E9 => X_C9, X_F9 => X_A9,
483 'k' => 'K', X_DA => X_BA, X_EA => X_CA, X_FA => X_AA,
484 'l' => 'L', X_DB => X_BB, X_EB => X_CB, X_FB => X_AB,
485 'm' => 'M', X_DC => X_BC, X_EC => X_CC, X_FC => X_AC,
486 'n' => 'N', X_DD => X_BD, X_ED => X_CD,
487 'o' => 'O', X_DE => X_BE, X_EE => X_CE, X_FE => X_AE,
488 'p' => 'P', X_DF => X_BF, X_EF => X_CF, X_FF => X_AF,
489 'q' => 'Q',
490 'r' => 'R',
491 's' => 'S',
492 't' => 'T',
493 'u' => 'U',
494 'v' => 'V',
495 'w' => 'W',
496 'x' => 'X',
497 'y' => 'Y',
498 'z' => 'Z',
500 'A' => 'A', X_B0 => X_B0, X_C0 => X_C0,
501 'B' => 'B', X_B1 => X_B1, X_C1 => X_C1, X_A1 => X_A1,
502 'C' => 'C', X_B2 => X_B2, X_C2 => X_C2, X_A2 => X_A2,
503 'D' => 'D', X_B3 => X_B3, X_C3 => X_C3, X_A3 => X_A3,
504 'E' => 'E', X_B4 => X_B4, X_C4 => X_C4, X_A4 => X_A4,
505 'F' => 'F', X_B5 => X_B5, X_C5 => X_C5, X_A5 => X_A5,
506 'G' => 'G', X_B6 => X_B6, X_C6 => X_C6, X_A6 => X_A6,
507 'H' => 'H', X_B7 => X_B7, X_C7 => X_C7, X_A7 => X_A7,
508 'I' => 'I', X_B8 => X_B8, X_C8 => X_C8, X_A8 => X_A8,
509 'J' => 'J', X_B9 => X_B9, X_C9 => X_C9, X_A9 => X_A9,
510 'K' => 'K', X_BA => X_BA, X_CA => X_CA, X_AA => X_AA,
511 'L' => 'L', X_BB => X_BB, X_CB => X_CB, X_AB => X_AB,
512 'M' => 'M', X_BC => X_BC, X_CC => X_CC, X_AC => X_AC,
513 'N' => 'N', X_BD => X_BD, X_CD => X_CD,
514 'O' => 'O', X_BE => X_BE, X_CE => X_CE, X_AE => X_AE,
515 'P' => 'P', X_BF => X_BF, X_CF => X_CF, X_AF => X_AF,
516 'Q' => 'Q',
517 'R' => 'R',
518 'S' => 'S',
519 'T' => 'T',
520 'U' => 'U',
521 'V' => 'V',
522 'W' => 'W',
523 'X' => 'X',
524 'Y' => 'Y',
525 'Z' => 'Z',
527 '0' => '0',
528 '1' => '1',
529 '2' => '2',
530 '3' => '3',
531 '4' => '4',
532 '5' => '5',
533 '6' => '6',
534 '7' => '7',
535 '8' => '8',
536 '9' => '9',
538 '_' => '_',
540 others => ' ');
542 -------------------------------------------
543 -- Definitions for Latin-9 (ISO 8859-15) --
544 -------------------------------------------
546 Fold_Latin_9 : constant Translate_Table := Translate_Table'(
548 'a' => 'A', X_E0 => X_C0, X_F0 => X_D0,
549 'b' => 'B', X_E1 => X_C1, X_F1 => X_D1,
550 'c' => 'C', X_E2 => X_C2, X_F2 => X_D2,
551 'd' => 'D', X_E3 => X_C3, X_F3 => X_D3,
552 'e' => 'E', X_E4 => X_C4, X_F4 => X_D4,
553 'f' => 'F', X_E5 => X_C5, X_F5 => X_D5,
554 'g' => 'G', X_E6 => X_C6, X_F6 => X_D6,
555 'h' => 'H', X_E7 => X_C7,
556 'i' => 'I', X_E8 => X_C8, X_F8 => X_D8,
557 'j' => 'J', X_E9 => X_C9, X_F9 => X_D9,
558 'k' => 'K', X_EA => X_CA, X_FA => X_DA,
559 'l' => 'L', X_EB => X_CB, X_FB => X_DB,
560 'm' => 'M', X_EC => X_CC, X_FC => X_DC,
561 'n' => 'N', X_ED => X_CD, X_FD => X_DD,
562 'o' => 'O', X_EE => X_CE, X_FE => X_DE,
563 'p' => 'P', X_EF => X_CF,
564 'q' => 'Q', X_A8 => X_A6,
565 'r' => 'R', X_B8 => X_B4,
566 's' => 'S', X_BD => X_BC,
567 't' => 'T', X_BE => X_FF,
568 'u' => 'U',
569 'v' => 'V',
570 'w' => 'W',
571 'x' => 'X',
572 'y' => 'Y',
573 'z' => 'Z',
575 'A' => 'A', X_C0 => X_C0, X_D0 => X_D0,
576 'B' => 'B', X_C1 => X_C1, X_D1 => X_D1,
577 'C' => 'C', X_C2 => X_C2, X_D2 => X_D2,
578 'D' => 'D', X_C3 => X_C3, X_D3 => X_D3,
579 'E' => 'E', X_C4 => X_C4, X_D4 => X_D4,
580 'F' => 'F', X_C5 => X_C5, X_D5 => X_D5,
581 'G' => 'G', X_C6 => X_C6, X_D6 => X_D6,
582 'H' => 'H', X_C7 => X_C7,
583 'I' => 'I', X_C8 => X_C8, X_D8 => X_D8,
584 'J' => 'J', X_C9 => X_C9, X_D9 => X_D9,
585 'K' => 'K', X_CA => X_CA, X_DA => X_DA,
586 'L' => 'L', X_CB => X_CB, X_DB => X_DB,
587 'M' => 'M', X_CC => X_CC, X_DC => X_DC,
588 'N' => 'N', X_CD => X_CD, X_DD => X_DD,
589 'O' => 'O', X_CE => X_CE, X_DE => X_DE,
590 'P' => 'P', X_CF => X_CF, X_DF => X_DF, X_FF => X_FF,
591 'Q' => 'Q', X_A6 => X_A6,
592 'R' => 'R', X_B4 => X_B4,
593 'S' => 'S', X_BC => X_BC,
594 'T' => 'T',
595 'U' => 'U',
596 'V' => 'V',
597 'W' => 'W',
598 'X' => 'X',
599 'Y' => 'Y',
600 'Z' => 'Z',
602 '0' => '0',
603 '1' => '1',
604 '2' => '2',
605 '3' => '3',
606 '4' => '4',
607 '5' => '5',
608 '6' => '6',
609 '7' => '7',
610 '8' => '8',
611 '9' => '9',
613 '_' => '_',
615 others => ' ');
617 --------------------------------------------
618 -- Definitions for IBM PC (Code Page 437) --
619 --------------------------------------------
621 -- Note: Code page 437 is the typical default in Windows for PC's in the
622 -- US, it corresponds to the original PC character set. See also the
623 -- definitions for code page 850.
625 Fold_IBM_PC_437 : constant Translate_Table := Translate_Table'(
627 'a' => 'A',
628 'b' => 'B',
629 'c' => 'C',
630 'd' => 'D',
631 'e' => 'E',
632 'f' => 'F',
633 'g' => 'G',
634 'h' => 'H',
635 'i' => 'I',
636 'j' => 'J',
637 'k' => 'K',
638 'l' => 'L',
639 'm' => 'M',
640 'n' => 'N',
641 'o' => 'O',
642 'p' => 'P',
643 'q' => 'Q',
644 'r' => 'R',
645 's' => 'S',
646 't' => 'T',
647 'u' => 'U',
648 'v' => 'V',
649 'w' => 'W',
650 'x' => 'X',
651 'y' => 'Y',
652 'z' => 'Z',
654 'A' => 'A',
655 'B' => 'B',
656 'C' => 'C',
657 'D' => 'D',
658 'E' => 'E',
659 'F' => 'F',
660 'G' => 'G',
661 'H' => 'H',
662 'I' => 'I',
663 'J' => 'J',
664 'K' => 'K',
665 'L' => 'L',
666 'M' => 'M',
667 'N' => 'N',
668 'O' => 'O',
669 'P' => 'P',
670 'Q' => 'Q',
671 'R' => 'R',
672 'S' => 'S',
673 'T' => 'T',
674 'U' => 'U',
675 'V' => 'V',
676 'W' => 'W',
677 'X' => 'X',
678 'Y' => 'Y',
679 'Z' => 'Z',
681 X_80 => X_80, -- C cedilla
682 X_81 => X_9A, -- u umlaut
683 X_82 => X_90, -- e acute
684 X_83 => X_83, -- a circumflex
685 X_84 => X_8E, -- a umlaut
686 X_85 => X_85, -- a grave
687 X_86 => X_8F, -- a ring
688 X_87 => X_80, -- c cedilla
689 X_88 => X_88, -- e circumflex
690 X_89 => X_89, -- e umlaut
691 X_8A => X_8A, -- e grave
692 X_8B => X_8B, -- i umlaut
693 X_8C => X_8C, -- i circumflex
694 X_8D => X_8D, -- i grave
695 X_8E => X_8E, -- A umlaut
696 X_8F => X_8F, -- A ring
698 X_90 => X_90, -- E acute
699 X_91 => X_92, -- ae
700 X_92 => X_92, -- AE
701 X_93 => X_93, -- o circumflex
702 X_94 => X_99, -- o umlaut
703 X_95 => X_95, -- o grave
704 X_96 => X_96, -- u circumflex
705 X_97 => X_97, -- u grave
706 X_98 => X_98, -- y umlaut
707 X_99 => X_99, -- O umlaut
708 X_9A => X_9A, -- U umlaut
710 X_A0 => X_A0, -- a acute
711 X_A1 => X_A1, -- i acute
712 X_A2 => X_A2, -- o acute
713 X_A3 => X_A3, -- u acute
714 X_A4 => X_A5, -- n tilde
715 X_A5 => X_A5, -- N tilde
716 X_A6 => X_A6, -- a underline
717 X_A7 => X_A7, -- o underline
719 X_E0 => X_E0, -- lower case alpha
720 X_E1 => X_E1, -- lower case beta
721 X_E2 => X_E2, -- upper case gamma
722 X_E3 => X_E3, -- lower case pi
723 X_E4 => X_E4, -- upper case sigma (lower/upper sigma not equivalent)
724 X_E5 => X_E5, -- lower case sigma (lower/upper sigma not equivalent)
725 X_E6 => X_E6, -- lower case mu
726 X_E7 => X_E7, -- lower case tau
727 X_E8 => X_E8, -- upper case phi (lower/upper phi not equivalent)
728 X_E9 => X_E9, -- lower case theta
729 X_EA => X_EA, -- upper case omega
730 X_EB => X_EB, -- lower case delta
731 X_ED => X_ED, -- lower case phi (lower/upper phi not equivalent)
732 X_EE => X_EE, -- lower case epsilon
734 X_FC => X_FC, -- lower case eta
736 '0' => '0',
737 '1' => '1',
738 '2' => '2',
739 '3' => '3',
740 '4' => '4',
741 '5' => '5',
742 '6' => '6',
743 '7' => '7',
744 '8' => '8',
745 '9' => '9',
747 '_' => '_',
749 others => ' ');
751 --------------------------------------------
752 -- Definitions for IBM PC (Code Page 850) --
753 --------------------------------------------
755 -- Note: Code page 850 is the typical default in Windows for PC's in
756 -- Europe, it is an extension of the original PC character set to include
757 -- the additional characters defined in ISO Latin-1. See also the
758 -- definitions for code page 437.
760 Fold_IBM_PC_850 : constant Translate_Table := Translate_Table'(
762 'a' => 'A',
763 'b' => 'B',
764 'c' => 'C',
765 'd' => 'D',
766 'e' => 'E',
767 'f' => 'F',
768 'g' => 'G',
769 'h' => 'H',
770 'i' => 'I',
771 'j' => 'J',
772 'k' => 'K',
773 'l' => 'L',
774 'm' => 'M',
775 'n' => 'N',
776 'o' => 'O',
777 'p' => 'P',
778 'q' => 'Q',
779 'r' => 'R',
780 's' => 'S',
781 't' => 'T',
782 'u' => 'U',
783 'v' => 'V',
784 'w' => 'W',
785 'x' => 'X',
786 'y' => 'Y',
787 'z' => 'Z',
789 'A' => 'A',
790 'B' => 'B',
791 'C' => 'C',
792 'D' => 'D',
793 'E' => 'E',
794 'F' => 'F',
795 'G' => 'G',
796 'H' => 'H',
797 'I' => 'I',
798 'J' => 'J',
799 'K' => 'K',
800 'L' => 'L',
801 'M' => 'M',
802 'N' => 'N',
803 'O' => 'O',
804 'P' => 'P',
805 'Q' => 'Q',
806 'R' => 'R',
807 'S' => 'S',
808 'T' => 'T',
809 'U' => 'U',
810 'V' => 'V',
811 'W' => 'W',
812 'X' => 'X',
813 'Y' => 'Y',
814 'Z' => 'Z',
816 X_80 => X_80, -- C cedilla
817 X_81 => X_9A, -- u umlaut
818 X_82 => X_90, -- e acute
819 X_83 => X_B6, -- a circumflex
820 X_84 => X_8E, -- a umlaut
821 X_85 => X_B7, -- a grave
822 X_86 => X_8F, -- a ring
823 X_87 => X_80, -- c cedilla
824 X_88 => X_D2, -- e circumflex
825 X_89 => X_D3, -- e umlaut
826 X_8A => X_D4, -- e grave
827 X_8B => X_D8, -- i umlaut
828 X_8C => X_D7, -- i circumflex
829 X_8D => X_DE, -- i grave
830 X_8E => X_8E, -- A umlaut
831 X_8F => X_8F, -- A ring
833 X_90 => X_90, -- E acute
834 X_91 => X_92, -- ae
835 X_92 => X_92, -- AE
836 X_93 => X_E2, -- o circumflex
837 X_94 => X_99, -- o umlaut
838 X_95 => X_E3, -- o grave
839 X_96 => X_EA, -- u circumflex
840 X_97 => X_EB, -- u grave
841 X_98 => X_98, -- y umlaut
842 X_99 => X_99, -- O umlaut
843 X_9A => X_9A, -- U umlaut
845 X_A0 => X_B5, -- a acute
846 X_A1 => X_D6, -- i acute
847 X_A2 => X_E0, -- o acute
848 X_A3 => X_E9, -- u acute
849 X_A4 => X_A5, -- n tilde
850 X_A5 => X_A5, -- N tilde
851 X_A6 => X_A6, -- a underline
852 X_A7 => X_A7, -- o underline
854 X_B5 => X_B5, -- A acute
855 X_B6 => X_B6, -- A circumflex
856 X_B7 => X_B7, -- A grave
858 X_C6 => X_C7, -- a tilde
859 X_C7 => X_C7, -- A tilde
861 X_D0 => X_D1, -- eth
862 X_D1 => X_D1, -- Eth
863 X_D2 => X_D2, -- E circumflex
864 X_D3 => X_D3, -- E umlaut
865 X_D4 => X_D4, -- E grave
866 X_D5 => X_D5, -- dotless i, no uppercase
867 X_D6 => X_D6, -- I acute
868 X_D7 => X_D7, -- I circumflex
869 X_D8 => X_D8, -- I umlaut
870 X_DE => X_DE, -- I grave
872 X_E0 => X_E0, -- O acute
873 X_E1 => X_E1, -- german dbl s, no uppercase
874 X_E2 => X_E2, -- O circumflex
875 X_E3 => X_E3, -- O grave
876 X_E4 => X_E4, -- o tilde
877 X_E5 => X_E5, -- O tilde
878 X_E7 => X_E8, -- thorn
879 X_E8 => X_E8, -- Thorn
880 X_E9 => X_E9, -- U acute
881 X_EA => X_EA, -- U circumflex
882 X_EB => X_EB, -- U grave
883 X_EC => X_ED, -- y acute
884 X_ED => X_ED, -- Y acute
886 '0' => '0',
887 '1' => '1',
888 '2' => '2',
889 '3' => '3',
890 '4' => '4',
891 '5' => '5',
892 '6' => '6',
893 '7' => '7',
894 '8' => '8',
895 '9' => '9',
897 '_' => '_',
899 others => ' ');
901 -----------------------------------------
902 -- Definitions for Full Upper Half Set --
903 -----------------------------------------
905 -- The full upper half set allows all upper half characters as letters,
906 -- and does not recognize any upper/lower case equivalences in this half.
908 Fold_Full_Upper_Half : constant Translate_Table := Translate_Table'(
910 'a' => 'A',
911 'b' => 'B',
912 'c' => 'C',
913 'd' => 'D',
914 'e' => 'E',
915 'f' => 'F',
916 'g' => 'G',
917 'h' => 'H',
918 'i' => 'I',
919 'j' => 'J',
920 'k' => 'K',
921 'l' => 'L',
922 'm' => 'M',
923 'n' => 'N',
924 'o' => 'O',
925 'p' => 'P',
926 'q' => 'Q',
927 'r' => 'R',
928 's' => 'S',
929 't' => 'T',
930 'u' => 'U',
931 'v' => 'V',
932 'w' => 'W',
933 'x' => 'X',
934 'y' => 'Y',
935 'z' => 'Z',
937 'A' => 'A',
938 'B' => 'B',
939 'C' => 'C',
940 'D' => 'D',
941 'E' => 'E',
942 'F' => 'F',
943 'G' => 'G',
944 'H' => 'H',
945 'I' => 'I',
946 'J' => 'J',
947 'K' => 'K',
948 'L' => 'L',
949 'M' => 'M',
950 'N' => 'N',
951 'O' => 'O',
952 'P' => 'P',
953 'Q' => 'Q',
954 'R' => 'R',
955 'S' => 'S',
956 'T' => 'T',
957 'U' => 'U',
958 'V' => 'V',
959 'W' => 'W',
960 'X' => 'X',
961 'Y' => 'Y',
962 'Z' => 'Z',
964 X_80 => X_80, X_90 => X_90, X_A0 => X_A0, X_B0 => X_B0,
965 X_81 => X_81, X_91 => X_91, X_A1 => X_A1, X_B1 => X_B1,
966 X_82 => X_82, X_92 => X_92, X_A2 => X_A2, X_B2 => X_B2,
967 X_83 => X_83, X_93 => X_93, X_A3 => X_A3, X_B3 => X_B3,
968 X_84 => X_84, X_94 => X_94, X_A4 => X_A4, X_B4 => X_B4,
969 X_85 => X_85, X_95 => X_95, X_A5 => X_A5, X_B5 => X_B5,
970 X_86 => X_86, X_96 => X_96, X_A6 => X_A6, X_B6 => X_B6,
971 X_87 => X_87, X_97 => X_97, X_A7 => X_A7, X_B7 => X_B7,
972 X_88 => X_88, X_98 => X_98, X_A8 => X_A8, X_B8 => X_B8,
973 X_89 => X_89, X_99 => X_99, X_A9 => X_A9, X_B9 => X_B9,
974 X_8A => X_8A, X_9A => X_9A, X_AA => X_AA, X_BA => X_BA,
975 X_8B => X_8B, X_9B => X_9B, X_AB => X_AB, X_BB => X_BB,
976 X_8C => X_8C, X_9C => X_9C, X_AC => X_AC, X_BC => X_BC,
977 X_8D => X_8D, X_9D => X_9D, X_AD => X_AD, X_BD => X_BD,
978 X_8E => X_8E, X_9E => X_9E, X_AE => X_AE, X_BE => X_BE,
979 X_8F => X_8F, X_9F => X_9F, X_AF => X_AF, X_BF => X_BF,
981 X_C0 => X_C0, X_D0 => X_D0, X_E0 => X_E0, X_F0 => X_F0,
982 X_C1 => X_C1, X_D1 => X_D1, X_E1 => X_E1, X_F1 => X_F1,
983 X_C2 => X_C2, X_D2 => X_D2, X_E2 => X_E2, X_F2 => X_F2,
984 X_C3 => X_C3, X_D3 => X_D3, X_E3 => X_E3, X_F3 => X_F3,
985 X_C4 => X_C4, X_D4 => X_D4, X_E4 => X_E4, X_F4 => X_F4,
986 X_C5 => X_C5, X_D5 => X_D5, X_E5 => X_E5, X_F5 => X_F5,
987 X_C6 => X_C6, X_D6 => X_D6, X_E6 => X_E6, X_F6 => X_F6,
988 X_C7 => X_C7, X_D7 => X_D7, X_E7 => X_E7, X_F7 => X_F7,
989 X_C8 => X_C8, X_D8 => X_D8, X_E8 => X_E8, X_F8 => X_F8,
990 X_C9 => X_C9, X_D9 => X_D9, X_E9 => X_E9, X_F9 => X_F9,
991 X_CA => X_CA, X_DA => X_DA, X_EA => X_EA, X_FA => X_FA,
992 X_CB => X_CB, X_DB => X_DB, X_EB => X_EB, X_FB => X_FB,
993 X_CC => X_CC, X_DC => X_DC, X_EC => X_EC, X_FC => X_FC,
994 X_CD => X_CD, X_DD => X_DD, X_ED => X_ED, X_FD => X_FD,
995 X_CE => X_CE, X_DE => X_DE, X_EE => X_EE, X_FE => X_FE,
996 X_CF => X_CF, X_DF => X_DF, X_EF => X_EF, X_FF => X_FF,
998 '0' => '0',
999 '1' => '1',
1000 '2' => '2',
1001 '3' => '3',
1002 '4' => '4',
1003 '5' => '5',
1004 '6' => '6',
1005 '7' => '7',
1006 '8' => '8',
1007 '9' => '9',
1009 '_' => '_',
1011 others => ' ');
1013 ---------------------------------------
1014 -- Definitions for No Upper Half Set --
1015 ---------------------------------------
1017 -- The no upper half set allows no upper half characters as letters, and
1018 -- thus there are no upper/lower case equivalences in this half. This set
1019 -- corresponds to the Ada 83 rules.
1021 Fold_No_Upper_Half : constant Translate_Table := Translate_Table'(
1023 'a' => 'A',
1024 'b' => 'B',
1025 'c' => 'C',
1026 'd' => 'D',
1027 'e' => 'E',
1028 'f' => 'F',
1029 'g' => 'G',
1030 'h' => 'H',
1031 'i' => 'I',
1032 'j' => 'J',
1033 'k' => 'K',
1034 'l' => 'L',
1035 'm' => 'M',
1036 'n' => 'N',
1037 'o' => 'O',
1038 'p' => 'P',
1039 'q' => 'Q',
1040 'r' => 'R',
1041 's' => 'S',
1042 't' => 'T',
1043 'u' => 'U',
1044 'v' => 'V',
1045 'w' => 'W',
1046 'x' => 'X',
1047 'y' => 'Y',
1048 'z' => 'Z',
1050 'A' => 'A',
1051 'B' => 'B',
1052 'C' => 'C',
1053 'D' => 'D',
1054 'E' => 'E',
1055 'F' => 'F',
1056 'G' => 'G',
1057 'H' => 'H',
1058 'I' => 'I',
1059 'J' => 'J',
1060 'K' => 'K',
1061 'L' => 'L',
1062 'M' => 'M',
1063 'N' => 'N',
1064 'O' => 'O',
1065 'P' => 'P',
1066 'Q' => 'Q',
1067 'R' => 'R',
1068 'S' => 'S',
1069 'T' => 'T',
1070 'U' => 'U',
1071 'V' => 'V',
1072 'W' => 'W',
1073 'X' => 'X',
1074 'Y' => 'Y',
1075 'Z' => 'Z',
1077 '0' => '0',
1078 '1' => '1',
1079 '2' => '2',
1080 '3' => '3',
1081 '4' => '4',
1082 '5' => '5',
1083 '6' => '6',
1084 '7' => '7',
1085 '8' => '8',
1086 '9' => '9',
1088 '_' => '_',
1090 others => ' ');
1092 ----------------
1093 -- Initialize --
1094 ----------------
1096 procedure Initialize is
1097 begin
1098 -- Set Fold_Upper table from source code indication
1100 if Identifier_Character_Set = '1'
1101 or else Identifier_Character_Set = 'w'
1102 then
1103 Fold_Upper := Fold_Latin_1;
1105 elsif Identifier_Character_Set = '2' then
1106 Fold_Upper := Fold_Latin_2;
1108 elsif Identifier_Character_Set = '3' then
1109 Fold_Upper := Fold_Latin_3;
1111 elsif Identifier_Character_Set = '4' then
1112 Fold_Upper := Fold_Latin_4;
1114 elsif Identifier_Character_Set = '5' then
1115 Fold_Upper := Fold_Cyrillic;
1117 elsif Identifier_Character_Set = 'p' then
1118 Fold_Upper := Fold_IBM_PC_437;
1120 elsif Identifier_Character_Set = '8' then
1121 Fold_Upper := Fold_IBM_PC_850;
1123 elsif Identifier_Character_Set = '9' then
1124 Fold_Upper := Fold_Latin_9;
1126 elsif Identifier_Character_Set = 'f' then
1127 Fold_Upper := Fold_Full_Upper_Half;
1129 else -- Identifier_Character_Set = 'n'
1130 Fold_Upper := Fold_No_Upper_Half;
1131 end if;
1133 -- Use Fold_Upper table to compute Fold_Lower table
1135 Fold_Lower := Fold_Upper;
1137 for J in Character loop
1138 if J /= Fold_Upper (J) then
1139 Fold_Lower (Fold_Upper (J)) := J;
1140 Fold_Lower (J) := J;
1141 end if;
1142 end loop;
1144 Fold_Lower (' ') := ' ';
1146 -- Build Identifier_Char table from used entries of Fold_Upper
1148 for J in Character loop
1149 Identifier_Char (J) := (Fold_Upper (J) /= ' ');
1150 end loop;
1152 -- Always add [ as an identifier character to deal with the brackets
1153 -- notation for wide characters used in identifiers. Note that if
1154 -- we are not allowing wide characters in identifiers, then any use
1155 -- of this notation will be flagged as an error in Scan_Identifier.
1157 Identifier_Char ('[') := True;
1159 -- Add entry for ESC if wide characters in use with a wide character
1160 -- encoding method active that uses the ESC code for encoding.
1162 if Identifier_Character_Set = 'w'
1163 and then Wide_Character_Encoding_Method in WC_ESC_Encoding_Method
1164 then
1165 Identifier_Char (ASCII.ESC) := True;
1166 end if;
1167 end Initialize;
1169 --------------------------
1170 -- Is_Lower_Case_Letter --
1171 --------------------------
1173 function Is_Lower_Case_Letter (C : Character) return Boolean is
1174 begin
1175 return C /= Fold_Upper (C);
1176 end Is_Lower_Case_Letter;
1178 --------------------------
1179 -- Is_Upper_Case_Letter --
1180 --------------------------
1182 function Is_Upper_Case_Letter (C : Character) return Boolean is
1183 begin
1184 return C /= Fold_Lower (C);
1185 end Is_Upper_Case_Letter;
1187 end Csets;