1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
10 -- Copyright (C) 2001 Free Software Foundation, Inc. --
12 -- GNAT is free software; you can redistribute it and/or modify it under --
13 -- terms of the GNU General Public License as published by the Free Soft- --
14 -- ware Foundation; either version 2, or (at your option) any later ver- --
15 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
16 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
17 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
18 -- for more details. You should have received a copy of the GNU General --
19 -- Public License distributed with GNAT; see file COPYING. If not, write --
20 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
21 -- MA 02111-1307, USA. --
23 -- GNAT was originally developed by the GNAT team at New York University. --
24 -- Extensive contributions were provided by Ada Core Technologies Inc. --
26 ------------------------------------------------------------------------------
28 -- This package defines allowed packages and attributes in GNAT project files
30 with Types
; use Types
;
35 -- Define the allowed attributes
37 -- All these declarations are uncommented, they all need comments ???
39 Attributes_Initial
: constant := 50;
40 Attributes_Increment
: constant := 50;
42 Attribute_Node_Low_Bound
: constant := 0;
43 Attribute_Node_High_Bound
: constant := 099_999_999
;
45 type Attribute_Node_Id
is
46 range Attribute_Node_Low_Bound
.. Attribute_Node_High_Bound
;
48 First_Attribute_Node_Id
: constant Attribute_Node_Id
:=
49 Attribute_Node_Low_Bound
;
51 Empty_Attribute
: constant Attribute_Node_Id
:=
52 Attribute_Node_Low_Bound
;
54 type Attribute_Kind
is
57 Case_Insensitive_Associative_Array
);
59 type Attribute_Record
is record
61 Kind_1
: Variable_Kind
;
62 Kind_2
: Attribute_Kind
;
63 Next
: Attribute_Node_Id
;
67 new Table
.Table
(Table_Component_Type
=> Attribute_Record
,
68 Table_Index_Type
=> Attribute_Node_Id
,
69 Table_Low_Bound
=> First_Attribute_Node_Id
,
70 Table_Initial
=> Attributes_Initial
,
71 Table_Increment
=> Attributes_Increment
,
72 Table_Name
=> "Prj.Attr.Attributes");
74 Attribute_First
: constant Attribute_Node_Id
:= First_Attribute_Node_Id
+ 1;
76 -- Define the allowed packages
78 Packages_Initial
: constant := 10;
79 Packages_Increment
: constant := 10;
81 Package_Node_Low_Bound
: constant := 0;
82 Package_Node_High_Bound
: constant := 099_999_999
;
84 type Package_Node_Id
is
85 range Package_Node_Low_Bound
.. Package_Node_High_Bound
;
87 First_Package_Node_Id
: constant Package_Node_Id
:=
88 Package_Node_Low_Bound
;
90 Empty_Package
: constant Package_Node_Id
:= Package_Node_Low_Bound
;
92 type Package_Record
is record
94 First_Attribute
: Attribute_Node_Id
;
97 package Package_Attributes
is
98 new Table
.Table
(Table_Component_Type
=> Package_Record
,
99 Table_Index_Type
=> Package_Node_Id
,
100 Table_Low_Bound
=> First_Package_Node_Id
,
101 Table_Initial
=> Packages_Initial
,
102 Table_Increment
=> Packages_Increment
,
103 Table_Name
=> "Prj.Attr.Packages");
105 Package_First
: constant Package_Node_Id
:= Package_Node_Low_Bound
+ 1;
107 procedure Initialize
;
108 -- Initialize the two tables above (Attributes and Package_Attributes).
109 -- This procedure should be called by Prj.Initialize.