i386: Allow all register_operand SUBREGs in x86_ternlog_idx.
[official-gcc.git] / gcc / ada / csets.ads
blob9dc78ba10e87bc2050e41d0b2acffd6551c9276f
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- C S E T S --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2024, 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. 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 COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
20 -- --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
23 -- --
24 ------------------------------------------------------------------------------
26 package Csets is
27 pragma Elaborate_Body;
29 -- This package contains character tables for the various character
30 -- sets that are supported for source representation. Character and
31 -- string literals are not affected, only identifiers. For each set,
32 -- the table in this package gives the mapping of letters to their
33 -- upper case equivalent. Each table thus provides the information
34 -- for building the table used to fold lower case to upper case, and
35 -- also the table of flags showing which characters are allowed in
36 -- identifiers.
38 type Translate_Table is array (Character) of Character;
39 -- Type used to describe translate tables
41 type Char_Array_Flags is array (Character) of Boolean;
42 -- Type used for character attribute arrays. Note that we deliberately
43 -- do NOT pack this table, since we don't want the extra overhead of
44 -- accessing a packed bit string.
46 ----------------------------------------------
47 -- Character Tables For Current Compilation --
48 ----------------------------------------------
50 procedure Initialize;
51 -- Routine to initialize following character tables, whose content depends
52 -- on the character code being used to represent the source program. In
53 -- particular, the use of the upper half of the 8-bit code set varies.
54 -- The character set in use is specified by the value stored in
55 -- Opt.Identifier_Character_Set, which has the following settings:
57 -- '1' Latin-1 (ISO-8859-1)
58 -- '2' Latin-2 (ISO-8859-2)
59 -- '3' Latin-3 (ISO-8859-3)
60 -- '4' Latin-4 (ISO-8859-4)
61 -- '5' Cyrillic (ISO-8859-5)
62 -- 'p' IBM PC (code page 437)
63 -- '8' IBM PC (code page 850)
64 -- '9' Latin-9 (ISO-8859-15)
65 -- 'f' Full upper set (all distinct)
66 -- 'n' No upper characters (Ada/83 rules)
67 -- 'w' Latin-1 plus wide characters also allowed
69 function Is_Upper_Case_Letter (C : Character) return Boolean;
70 pragma Inline (Is_Upper_Case_Letter);
71 -- Determine if character is upper case letter
73 function Is_Lower_Case_Letter (C : Character) return Boolean;
74 pragma Inline (Is_Lower_Case_Letter);
75 -- Determine if character is lower case letter
77 Fold_Upper : Translate_Table;
78 -- Table to fold lower case identifier letters to upper case
80 Fold_Lower : Translate_Table;
81 -- Table to fold upper case identifier letters to lower case
83 Identifier_Char : Char_Array_Flags;
84 -- This table has True entries for all characters that can legally appear
85 -- in identifiers, including digits, the underline character, all letters
86 -- including upper and lower case and extended letters (as controlled by
87 -- the setting of Opt.Identifier_Character_Set), left bracket for brackets
88 -- notation wide characters and also ESC if wide characters are permitted
89 -- in identifiers using escape sequences starting with ESC.
91 end Csets;