1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
11 -- Copyright (C) 2001 Free Software Foundation, Inc. --
13 -- GNAT is free software; you can redistribute it and/or modify it under --
14 -- terms of the GNU General Public License as published by the Free Soft- --
15 -- ware Foundation; either version 2, or (at your option) any later ver- --
16 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
19 -- for more details. You should have received a copy of the GNU General --
20 -- Public License distributed with GNAT; see file COPYING. If not, write --
21 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
22 -- MA 02111-1307, USA. --
24 -- GNAT was originally developed by the GNAT team at New York University. --
25 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
27 ------------------------------------------------------------------------------
29 -- This package defines allowed packages and attributes in GNAT project files
31 with Types
; use Types
;
36 -- Define the allowed attributes
38 -- All these declarations are uncommented, they all need comments ???
40 Attributes_Initial
: constant := 50;
41 Attributes_Increment
: constant := 50;
43 Attribute_Node_Low_Bound
: constant := 0;
44 Attribute_Node_High_Bound
: constant := 099_999_999
;
46 type Attribute_Node_Id
is
47 range Attribute_Node_Low_Bound
.. Attribute_Node_High_Bound
;
49 First_Attribute_Node_Id
: constant Attribute_Node_Id
:=
50 Attribute_Node_Low_Bound
;
52 Empty_Attribute
: constant Attribute_Node_Id
:=
53 Attribute_Node_Low_Bound
;
55 type Attribute_Kind
is
58 Case_Insensitive_Associative_Array
);
60 type Attribute_Record
is record
62 Kind_1
: Variable_Kind
;
63 Kind_2
: Attribute_Kind
;
64 Next
: Attribute_Node_Id
;
68 new Table
.Table
(Table_Component_Type
=> Attribute_Record
,
69 Table_Index_Type
=> Attribute_Node_Id
,
70 Table_Low_Bound
=> First_Attribute_Node_Id
,
71 Table_Initial
=> Attributes_Initial
,
72 Table_Increment
=> Attributes_Increment
,
73 Table_Name
=> "Prj.Attr.Attributes");
75 Attribute_First
: constant Attribute_Node_Id
:= First_Attribute_Node_Id
+ 1;
77 -- Define the allowed packages
79 Packages_Initial
: constant := 10;
80 Packages_Increment
: constant := 10;
82 Package_Node_Low_Bound
: constant := 0;
83 Package_Node_High_Bound
: constant := 099_999_999
;
85 type Package_Node_Id
is
86 range Package_Node_Low_Bound
.. Package_Node_High_Bound
;
88 First_Package_Node_Id
: constant Package_Node_Id
:=
89 Package_Node_Low_Bound
;
91 Empty_Package
: constant Package_Node_Id
:= Package_Node_Low_Bound
;
93 type Package_Record
is record
95 First_Attribute
: Attribute_Node_Id
;
98 package Package_Attributes
is
99 new Table
.Table
(Table_Component_Type
=> Package_Record
,
100 Table_Index_Type
=> Package_Node_Id
,
101 Table_Low_Bound
=> First_Package_Node_Id
,
102 Table_Initial
=> Packages_Initial
,
103 Table_Increment
=> Packages_Increment
,
104 Table_Name
=> "Prj.Attr.Packages");
106 Package_First
: constant Package_Node_Id
:= Package_Node_Low_Bound
+ 1;
108 procedure Initialize
;
109 -- Initialize the two tables above (Attributes and Package_Attributes).
110 -- This procedure should be called by Prj.Initialize.