annotate gcc/ada/fname.ads @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ------------------------------------------------------------------------------
kono
parents:
diff changeset
2 -- --
kono
parents:
diff changeset
3 -- GNAT COMPILER COMPONENTS --
kono
parents:
diff changeset
4 -- --
kono
parents:
diff changeset
5 -- F N A M E --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
9 -- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
111
kono
parents:
diff changeset
10 -- --
kono
parents:
diff changeset
11 -- GNAT is free software; you can redistribute it and/or modify it under --
kono
parents:
diff changeset
12 -- terms of the GNU General Public License as published by the Free Soft- --
kono
parents:
diff changeset
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
kono
parents:
diff changeset
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
kono
parents:
diff changeset
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
kono
parents:
diff changeset
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
kono
parents:
diff changeset
17 -- --
kono
parents:
diff changeset
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
kono
parents:
diff changeset
19 -- additional permissions described in the GCC Runtime Library Exception, --
kono
parents:
diff changeset
20 -- version 3.1, as published by the Free Software Foundation. --
kono
parents:
diff changeset
21 -- --
kono
parents:
diff changeset
22 -- You should have received a copy of the GNU General Public License and --
kono
parents:
diff changeset
23 -- a copy of the GCC Runtime Library Exception along with this program; --
kono
parents:
diff changeset
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
kono
parents:
diff changeset
25 -- <http://www.gnu.org/licenses/>. --
kono
parents:
diff changeset
26 -- --
kono
parents:
diff changeset
27 -- GNAT was originally developed by the GNAT team at New York University. --
kono
parents:
diff changeset
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
kono
parents:
diff changeset
29 -- --
kono
parents:
diff changeset
30 ------------------------------------------------------------------------------
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 -- This package, together with its child package Fname.UF define the
kono
parents:
diff changeset
33 -- association between source file names and unit names as defined
kono
parents:
diff changeset
34 -- (see package Uname for definition of format of unit names).
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 with Namet; use Namet;
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 package Fname is
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 -- Note: this package spec does not depend on the Uname spec in the Ada
kono
parents:
diff changeset
41 -- sense, but the comments and description of the semantics do depend on
kono
parents:
diff changeset
42 -- the conventions established by Uname.
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 ---------------------------
kono
parents:
diff changeset
45 -- File Name Conventions --
kono
parents:
diff changeset
46 ---------------------------
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 -- GNAT requires that there be a one to one correspondence between source
kono
parents:
diff changeset
49 -- file names (as used in the Osint package interface) and unit names as
kono
parents:
diff changeset
50 -- defined by the Uname package. This correspondence is defined by the
kono
parents:
diff changeset
51 -- two subprograms defined here in the Fname package.
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 -- For full rules of file naming, see GNAT User's Guide. Note that the
kono
parents:
diff changeset
54 -- naming rules are affected by the presence of Source_File_Name pragmas
kono
parents:
diff changeset
55 -- that have been previously processed.
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 -- Note that the file name does *not* include the directory name. The
kono
parents:
diff changeset
58 -- management of directories is provided by Osint, and full file names
kono
parents:
diff changeset
59 -- are used only for error message purposes within GNAT itself.
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 -----------------
kono
parents:
diff changeset
62 -- Subprograms --
kono
parents:
diff changeset
63 -----------------
kono
parents:
diff changeset
64
kono
parents:
diff changeset
65 function Is_Predefined_File_Name
kono
parents:
diff changeset
66 (Fname : String;
kono
parents:
diff changeset
67 Renamings_Included : Boolean := True) return Boolean;
kono
parents:
diff changeset
68 function Is_Predefined_File_Name
kono
parents:
diff changeset
69 (Fname : File_Name_Type;
kono
parents:
diff changeset
70 Renamings_Included : Boolean := True) return Boolean;
kono
parents:
diff changeset
71 -- These functions determine if the given file name (which must be a simple
kono
parents:
diff changeset
72 -- file name with no directory information) is the source or ALI file name
kono
parents:
diff changeset
73 -- for one of the predefined library units (i.e. part of the Ada, System,
kono
parents:
diff changeset
74 -- or Interface hierarchies). Note that units in the GNAT hierarchy are not
kono
parents:
diff changeset
75 -- considered predefined (see Is_Internal_File_Name below).
kono
parents:
diff changeset
76 --
kono
parents:
diff changeset
77 -- The Renamings_Included parameter indicates whether annex J renamings
kono
parents:
diff changeset
78 -- such as Text_IO are to be considered as predefined. If
kono
parents:
diff changeset
79 -- Renamings_Included is True, then Text_IO will return True, otherwise
kono
parents:
diff changeset
80 -- only children of Ada, Interfaces and System return True.
kono
parents:
diff changeset
81
kono
parents:
diff changeset
82 function Is_Predefined_Renaming_File_Name
kono
parents:
diff changeset
83 (Fname : String) return Boolean;
kono
parents:
diff changeset
84 function Is_Predefined_Renaming_File_Name
kono
parents:
diff changeset
85 (Fname : File_Name_Type) return Boolean;
kono
parents:
diff changeset
86 -- True if Fname is the file name for a predefined renaming (the same file
kono
parents:
diff changeset
87 -- names that are included if Renamings_Included => True is passed to
kono
parents:
diff changeset
88 -- Is_Predefined_File_Name).
kono
parents:
diff changeset
89
kono
parents:
diff changeset
90 function Is_Internal_File_Name
kono
parents:
diff changeset
91 (Fname : String;
kono
parents:
diff changeset
92 Renamings_Included : Boolean := True) return Boolean;
kono
parents:
diff changeset
93 function Is_Internal_File_Name
kono
parents:
diff changeset
94 (Fname : File_Name_Type;
kono
parents:
diff changeset
95 Renamings_Included : Boolean := True) return Boolean;
kono
parents:
diff changeset
96 -- Same as Is_Predefined_File_Name, except units in the GNAT hierarchy are
kono
parents:
diff changeset
97 -- included.
kono
parents:
diff changeset
98
kono
parents:
diff changeset
99 function Is_GNAT_File_Name (Fname : String) return Boolean;
kono
parents:
diff changeset
100 function Is_GNAT_File_Name (Fname : File_Name_Type) return Boolean;
kono
parents:
diff changeset
101 -- True for units in the GNAT hierarchy
kono
parents:
diff changeset
102
kono
parents:
diff changeset
103 procedure Tree_Read;
kono
parents:
diff changeset
104 -- Dummy procedure (reads dummy table values from tree file)
kono
parents:
diff changeset
105
kono
parents:
diff changeset
106 procedure Tree_Write;
kono
parents:
diff changeset
107 -- Writes out internal tables to current tree file using Tree_Write
kono
parents:
diff changeset
108 -- This is actually a dummy routine, since the relevant table is
kono
parents:
diff changeset
109 -- no longer used, but we retain it for now, to avoid a tree file
kono
parents:
diff changeset
110 -- incompatibility with the 3.13 compiler. Should be removed for
kono
parents:
diff changeset
111 -- the 3.14a release ???
kono
parents:
diff changeset
112
kono
parents:
diff changeset
113 end Fname;