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