OSDN Git Service

* make.adb:
[pf3gnuchains/gcc-fork.git] / gcc / ada / prj-tree.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                              P R J . T R E E                             --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --                            $Revision$
10 --                                                                          --
11 --             Copyright (C) 2001 Free Software Foundation, Inc.            --
12 --                                                                          --
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.                                                      --
23 --                                                                          --
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). --
26 --                                                                          --
27 ------------------------------------------------------------------------------
28
29 --  This package defines the structure of the Project File tree.
30
31 with GNAT.HTable;
32
33 with Prj.Attr; use Prj.Attr;
34 with Prj.Com;  use Prj.Com;
35 with Types;    use Types;
36 with Table;
37
38 package Prj.Tree is
39
40    Project_Nodes_Initial   : constant := 1_000;
41    --  Initial number of nodes in table Tree_Private_Part.Project_Nodes
42    Project_Nodes_Increment : constant := 100;
43
44    Project_Node_Low_Bound  : constant := 0;
45    Project_Node_High_Bound : constant := 099_999_999; -- In practice, infinite
46
47    type Project_Node_Id is range
48      Project_Node_Low_Bound .. Project_Node_High_Bound;
49    --  The index of table Tree_Private_Part.Project_Nodes
50
51    Empty_Node    : constant Project_Node_Id := Project_Node_Low_Bound;
52    --  Designates no node in table Project_Nodes
53    First_Node_Id : constant Project_Node_Id := Project_Node_Low_Bound;
54
55    subtype Variable_Node_Id       is Project_Node_Id;
56    --  Used to designate a node whose expected kind is
57    --  N_Typed_Variable_Declaration, N_Variable_Declaration or
58    --  N_Variable_Reference.
59    subtype Package_Declaration_Id is Project_Node_Id;
60    --  Used to designate a node whose expected kind is
61    --  N_Project_Declaration.
62
63    type Project_Node_Kind is
64      (N_Project,
65       N_With_Clause,
66       N_Project_Declaration,
67       N_Declarative_Item,
68       N_Package_Declaration,
69       N_String_Type_Declaration,
70       N_Literal_String,
71       N_Attribute_Declaration,
72       N_Typed_Variable_Declaration,
73       N_Variable_Declaration,
74       N_Expression,
75       N_Term,
76       N_Literal_String_List,
77       N_Variable_Reference,
78       N_External_Value,
79       N_Attribute_Reference,
80       N_Case_Construction,
81       N_Case_Item);
82    --  Each node in the tree is of a Project_Node_Kind
83    --  For the signification of the fields in each node of a
84    --  Project_Node_Kind, look at package Tree_Private_Part.
85
86    procedure Initialize;
87    --  Initialize the Project File tree: empty the Project_Nodes table
88    --  and reset the Projects_Htable.
89
90    function Default_Project_Node
91      (Of_Kind       : Project_Node_Kind;
92       And_Expr_Kind : Variable_Kind := Undefined)
93      return Project_Node_Id;
94    --  Returns a Project_Node_Record with the specified Kind and
95    --  Expr_Kind; all the other components have default nil values.
96
97    ----------------------
98    -- Access Functions --
99    ----------------------
100
101    --  The following query functions are part of the abstract interface
102    --  of the Project File tree
103
104    function Name_Of (Node : Project_Node_Id) return Name_Id;
105    --  Valid for all non empty nodes. May return No_Name for nodes that have
106    --  no names.
107
108    function Kind_Of (Node : Project_Node_Id) return Project_Node_Kind;
109    --  Valid for all non empty nodes
110
111    function Location_Of (Node : Project_Node_Id) return Source_Ptr;
112    --  Valid for all non empty nodes
113
114    function Directory_Of (Node : Project_Node_Id) return Name_Id;
115    --  Only valid for N_Project nodes.
116
117    function Expression_Kind_Of (Node : Project_Node_Id) return Variable_Kind;
118    --  Only valid for N_Literal_String, N_Attribute_Declaration,
119    --  N_Variable_Declaration, N_Typed_Variable_Declaration, N_Expression,
120    --  N_Term, N_Variable_Reference or N_Attribute_Reference nodes.
121
122    function First_Variable_Of
123      (Node  : Project_Node_Id)
124       return Variable_Node_Id;
125    --  Only valid for N_Project or N_Package_Declaration nodes
126
127    function First_Package_Of
128      (Node  : Project_Node_Id)
129       return  Package_Declaration_Id;
130    --  Only valid for N_Project nodes
131
132    function Package_Id_Of (Node  : Project_Node_Id) return Package_Node_Id;
133    --  Only valid for N_Package_Declaration nodes
134
135    function Path_Name_Of (Node  : Project_Node_Id) return Name_Id;
136    --  Only valid for N_Project and N_With_Clause nodes.
137
138    function String_Value_Of (Node  : Project_Node_Id) return String_Id;
139    --  Only valid for N_With_Clause or N_Literal_String nodes.
140
141    function First_With_Clause_Of
142      (Node  : Project_Node_Id)
143       return  Project_Node_Id;
144    --  Only valid for N_Project nodes
145
146    function Project_Declaration_Of
147      (Node  : Project_Node_Id)
148       return  Project_Node_Id;
149    --  Only valid for N_Project nodes
150
151    function First_String_Type_Of
152      (Node  : Project_Node_Id)
153       return  Project_Node_Id;
154    --  Only valid for N_Project nodes
155
156    function Modified_Project_Path_Of
157      (Node  : Project_Node_Id)
158       return  String_Id;
159    --  Only valid for N_With_Clause nodes
160
161    function Project_Node_Of
162      (Node  : Project_Node_Id)
163       return  Project_Node_Id;
164    --  Only valid for N_Project nodes
165
166    function Next_With_Clause_Of
167      (Node  : Project_Node_Id)
168       return  Project_Node_Id;
169    --  Only valid for N_With_Clause nodes
170
171    function First_Declarative_Item_Of
172      (Node  : Project_Node_Id)
173       return  Project_Node_Id;
174    --  Only valid for N_With_Clause nodes
175
176    function Modified_Project_Of
177      (Node  : Project_Node_Id)
178       return Project_Node_Id;
179    --  Only valid for N_With_Clause nodes
180
181    function Current_Item_Node
182      (Node  : Project_Node_Id)
183       return  Project_Node_Id;
184    --  Only valid for N_Declarative_Item nodes
185
186    function Next_Declarative_Item
187      (Node  : Project_Node_Id)
188       return  Project_Node_Id;
189    --  Only valid for N_Declarative_Item node
190
191    function Project_Of_Renamed_Package_Of
192      (Node  : Project_Node_Id)
193       return  Project_Node_Id;
194    --  Only valid for N_Package_Declaration nodes.
195    --  May return Empty_Node.
196
197    function Next_Package_In_Project
198      (Node  : Project_Node_Id)
199       return  Project_Node_Id;
200    --  Only valid for N_Package_Declaration nodes
201
202    function First_Literal_String
203      (Node  : Project_Node_Id)
204       return  Project_Node_Id;
205    --  Only valid for N_String_Type_Declaration nodes
206
207    function Next_String_Type
208      (Node  : Project_Node_Id)
209       return  Project_Node_Id;
210    --  Only valid for N_String_Type_Declaration nodes
211
212    function Next_Literal_String
213      (Node  : Project_Node_Id)
214       return  Project_Node_Id;
215    --  Only valid for N_Literal_String nodes
216
217    function Expression_Of
218      (Node  : Project_Node_Id)
219       return  Project_Node_Id;
220    --  Only valid for N_Attribute_Declaration, N_Typed_Variable_Declaration
221    --  or N_Variable_Declaration nodes
222
223    function Value_Is_Valid
224      (For_Typed_Variable : Project_Node_Id;
225       Value              : String_Id)
226       return               Boolean;
227    --  Only valid for N_Typed_Variable_Declaration. Returns True if Value is
228    --  in the list of allowed strings for For_Typed_Variable. False otherwise.
229
230    function Associative_Array_Index_Of
231      (Node  : Project_Node_Id)
232       return  String_Id;
233    --  Only valid for N_Attribute_Declaration.
234    --  Returns No_String for non associative array attributes.
235
236    function Next_Variable
237      (Node  : Project_Node_Id)
238       return  Project_Node_Id;
239    --  Only valid for N_Typed_Variable_Declaration or N_Variable_Declaration
240    --  nodes.
241
242    function First_Term
243      (Node  : Project_Node_Id)
244       return  Project_Node_Id;
245    --  Only valid for N_Expression nodes
246
247    function Next_Expression_In_List
248      (Node  : Project_Node_Id)
249       return  Project_Node_Id;
250    --  Only valid for N_Expression nodes
251
252    function Current_Term
253      (Node  : Project_Node_Id)
254       return  Project_Node_Id;
255    --  Only valid for N_Term nodes
256
257    function Next_Term
258      (Node  : Project_Node_Id)
259       return  Project_Node_Id;
260    --  Only valid for N_Term nodes
261
262    function First_Expression_In_List
263      (Node  : Project_Node_Id)
264       return  Project_Node_Id;
265    --  Only valid for N_Literal_String_List nodes
266
267    function Package_Node_Of
268      (Node  : Project_Node_Id)
269       return  Project_Node_Id;
270    --  Only valid for N_Variable_Reference or N_Attribute_Reference nodes.
271    --  May return Empty_Node.
272
273    function String_Type_Of
274      (Node  : Project_Node_Id)
275       return  Project_Node_Id;
276    --  Only valid for N_Variable_Reference or N_Typed_Variable_Declaration
277    --  nodes.
278
279    function External_Reference_Of
280      (Node  : Project_Node_Id)
281       return  Project_Node_Id;
282    --  Only valid for N_External_Value nodes
283
284    function External_Default_Of
285      (Node  : Project_Node_Id)
286       return  Project_Node_Id;
287    --  Only valid for N_External_Value nodes
288
289    function Case_Variable_Reference_Of
290      (Node  : Project_Node_Id)
291       return  Project_Node_Id;
292    --  Only valid for N_Case_Construction nodes
293
294    function First_Case_Item_Of
295      (Node  : Project_Node_Id)
296       return  Project_Node_Id;
297    --  Only valid for N_Case_Construction nodes
298
299    function First_Choice_Of
300      (Node  : Project_Node_Id)
301       return  Project_Node_Id;
302    --  Only valid for N_Case_Item nodes
303
304    function Next_Case_Item
305      (Node  : Project_Node_Id)
306       return  Project_Node_Id;
307    --  Only valid for N_Case_Item nodes
308
309    function Case_Insensitive (Node : Project_Node_Id) return Boolean;
310    --  Only valid for N_Attribute_Declaration nodes
311
312    --------------------
313    -- Set Procedures --
314    --------------------
315
316    --  The following procedures are part of the abstract interface of
317    --  the Project File tree.
318
319    --  Each Set_* procedure is valid only for the same Project_Node_Kind
320    --  nodes as the corresponding query function above.
321
322    procedure Set_Name_Of
323      (Node : Project_Node_Id;
324       To   : Name_Id);
325
326    procedure Set_Kind_Of
327      (Node : Project_Node_Id;
328       To   : Project_Node_Kind);
329
330    procedure Set_Location_Of
331      (Node : Project_Node_Id;
332       To   : Source_Ptr);
333
334    procedure Set_Directory_Of
335      (Node : Project_Node_Id;
336       To   : Name_Id);
337
338    procedure Set_Expression_Kind_Of
339      (Node : Project_Node_Id;
340       To   : Variable_Kind);
341
342    procedure Set_First_Variable_Of
343      (Node : Project_Node_Id;
344       To   : Variable_Node_Id);
345
346    procedure Set_First_Package_Of
347      (Node : Project_Node_Id;
348       To   : Package_Declaration_Id);
349
350    procedure Set_Package_Id_Of
351      (Node : Project_Node_Id;
352       To   : Package_Node_Id);
353
354    procedure Set_Path_Name_Of
355      (Node : Project_Node_Id;
356       To   : Name_Id);
357
358    procedure Set_String_Value_Of
359      (Node : Project_Node_Id;
360       To   : String_Id);
361
362    procedure Set_First_With_Clause_Of
363      (Node : Project_Node_Id;
364       To   : Project_Node_Id);
365
366    procedure Set_Project_Declaration_Of
367      (Node : Project_Node_Id;
368       To   : Project_Node_Id);
369
370    procedure Set_First_String_Type_Of
371      (Node : Project_Node_Id;
372       To   : Project_Node_Id);
373
374    procedure Set_Modified_Project_Path_Of
375      (Node : Project_Node_Id;
376       To   : String_Id);
377
378    procedure Set_Project_Node_Of
379      (Node : Project_Node_Id;
380       To   : Project_Node_Id);
381
382    procedure Set_Next_With_Clause_Of
383      (Node : Project_Node_Id;
384       To   : Project_Node_Id);
385
386    procedure Set_First_Declarative_Item_Of
387      (Node : Project_Node_Id;
388       To   : Project_Node_Id);
389
390    procedure Set_Modified_Project_Of
391      (Node : Project_Node_Id;
392       To   : Project_Node_Id);
393
394    procedure Set_Current_Item_Node
395      (Node : Project_Node_Id;
396       To   : Project_Node_Id);
397
398    procedure Set_Next_Declarative_Item
399      (Node : Project_Node_Id;
400       To   : Project_Node_Id);
401
402    procedure Set_Project_Of_Renamed_Package_Of
403      (Node : Project_Node_Id;
404       To   : Project_Node_Id);
405
406    procedure Set_Next_Package_In_Project
407      (Node : Project_Node_Id;
408       To   : Project_Node_Id);
409
410    procedure Set_First_Literal_String
411      (Node : Project_Node_Id;
412       To   : Project_Node_Id);
413
414    procedure Set_Next_String_Type
415      (Node : Project_Node_Id;
416       To   : Project_Node_Id);
417
418    procedure Set_Next_Literal_String
419      (Node : Project_Node_Id;
420       To   : Project_Node_Id);
421
422    procedure Set_Expression_Of
423      (Node : Project_Node_Id;
424       To   : Project_Node_Id);
425
426    procedure Set_Associative_Array_Index_Of
427      (Node : Project_Node_Id;
428       To   : String_Id);
429
430    procedure Set_Next_Variable
431      (Node : Project_Node_Id;
432       To   : Project_Node_Id);
433
434    procedure Set_First_Term
435      (Node : Project_Node_Id;
436       To   : Project_Node_Id);
437
438    procedure Set_Next_Expression_In_List
439      (Node : Project_Node_Id;
440       To   : Project_Node_Id);
441
442    procedure Set_Current_Term
443      (Node : Project_Node_Id;
444       To   : Project_Node_Id);
445
446    procedure Set_Next_Term
447      (Node : Project_Node_Id;
448       To   : Project_Node_Id);
449
450    procedure Set_First_Expression_In_List
451      (Node : Project_Node_Id;
452       To   : Project_Node_Id);
453
454    procedure Set_Package_Node_Of
455      (Node : Project_Node_Id;
456       To   : Project_Node_Id);
457
458    procedure Set_String_Type_Of
459      (Node : Project_Node_Id;
460       To   : Project_Node_Id);
461
462    procedure Set_External_Reference_Of
463      (Node : Project_Node_Id;
464       To   : Project_Node_Id);
465
466    procedure Set_External_Default_Of
467      (Node : Project_Node_Id;
468       To   : Project_Node_Id);
469
470    procedure Set_Case_Variable_Reference_Of
471      (Node : Project_Node_Id;
472       To   : Project_Node_Id);
473
474    procedure Set_First_Case_Item_Of
475      (Node : Project_Node_Id;
476       To   : Project_Node_Id);
477
478    procedure Set_First_Choice_Of
479      (Node : Project_Node_Id;
480       To   : Project_Node_Id);
481
482    procedure Set_Next_Case_Item
483      (Node : Project_Node_Id;
484       To   : Project_Node_Id);
485
486    procedure Set_Case_Insensitive
487      (Node : Project_Node_Id;
488       To   : Boolean);
489
490    -------------------------------
491    -- Restricted Access Section --
492    -------------------------------
493
494    package Tree_Private_Part is
495
496       --  This is conceptually in the private part.
497       --  However, for efficiency, some packages are accessing it directly.
498
499       type Project_Node_Record is record
500
501          Kind             : Project_Node_Kind;
502
503          Location         : Source_Ptr    := No_Location;
504
505          Directory        : Name_Id       := No_Name;
506          --  Only for N_Project
507
508          Expr_Kind        : Variable_Kind := Undefined;
509          --  See below for what Project_Node_Kind it is used
510
511          Variables        : Variable_Node_Id := Empty_Node;
512          --  First variable in a project or a package
513
514          Packages         : Package_Declaration_Id := Empty_Node;
515          --  First package declaration in a project
516
517          Pkg_Id           : Package_Node_Id := Empty_Package;
518          --  Only use in Package_Declaration
519
520          Name             : Name_Id         := No_Name;
521          --  See below for what Project_Node_Kind it is used
522
523          Path_Name        : Name_Id         := No_Name;
524          --  See below for what Project_Node_Kind it is used
525
526          Value            : String_Id       := No_String;
527          --  See below for what Project_Node_Kind it is used
528
529          Field1           : Project_Node_Id := Empty_Node;
530          --  See below the meaning for each Project_Node_Kind
531
532          Field2           : Project_Node_Id := Empty_Node;
533          --  See below the meaning for each Project_Node_Kind
534
535          Field3           : Project_Node_Id := Empty_Node;
536          --  See below the meaning for each Project_Node_Kind
537
538          Case_Insensitive : Boolean         := False;
539          --  Indicates, for an associative array attribute, that the
540          --  index is case insensitive.
541
542       end record;
543
544       --  type Project_Node_Kind is
545
546       --   (N_Project,
547       --    --  Name:      project name
548       --    --  Path_Name: project path name
549       --    --  Expr_Kind: Undefined
550       --    --  Field1:    first with clause
551       --    --  Field2:    project declaration
552       --    --  Field3:    first string type
553       --    --  Value:     modified project path name (if any)
554
555       --    N_With_Clause,
556       --    --  Name:      imported project name
557       --    --  Path_Name: imported project path name
558       --    --  Expr_Kind: Undefined
559       --    --  Field1:    project node
560       --    --  Field2:    next with clause
561       --    --  Field3:    not used
562       --    --  Value:     literal string withed
563
564       --    N_Project_Declaration,
565       --    --  Name:      not used
566       --    --  Path_Name: not used
567       --    --  Expr_Kind: Undefined
568       --    --  Field1:    first declarative item
569       --    --  Field2:    modified project
570       --    --  Field3:    not used
571       --    --  Value:     not used
572
573       --    N_Declarative_Item,
574       --    --  Name:      not used
575       --    --  Path_Name: not used
576       --    --  Expr_Kind: Undefined
577       --    --  Field1:    current item node
578       --    --  Field2:    next declarative item
579       --    --  Field3:    not used
580       --    --  Value:     not used
581
582       --    N_Package_Declaration,
583       --    --  Name:      package name
584       --    --  Path_Name: not used
585       --    --  Expr_Kind: Undefined
586       --    --  Field1:    project of renamed package (if any)
587       --    --  Field2:    first declarative item
588       --    --  Field3:    next package in project
589       --    --  Value:     not used
590
591       --    N_String_Type_Declaration,
592       --    --  Name:      type name
593       --    --  Path_Name: not used
594       --    --  Expr_Kind: Undefined
595       --    --  Field1:    first literal string
596       --    --  Field2:    next string type
597       --    --  Field3:    not used
598       --    --  Value:     not used
599
600       --    N_Literal_String,
601       --    --  Name:      not used
602       --    --  Path_Name: not used
603       --    --  Expr_Kind: Single
604       --    --  Field1:    next literal string
605       --    --  Field2:    not used
606       --    --  Field3:    not used
607       --    --  Value:     string value
608
609       --    N_Attribute_Declaration,
610       --    --  Name:      attribute name
611       --    --  Path_Name: not used
612       --    --  Expr_Kind: attribute kind
613       --    --  Field1:    expression
614       --    --  Field2:    not used
615       --    --  Field3:    not used
616       --    --  Value:     associative array index
617       --    --             (if an associative array element)
618
619       --    N_Typed_Variable_Declaration,
620       --    --  Name:      variable name
621       --    --  Path_Name: not used
622       --    --  Expr_Kind: Single
623       --    --  Field1:    expression
624       --    --  Field2:    type of variable (N_String_Type_Declaration)
625       --    --  Field3:    next variable
626       --    --  Value:     not used
627
628       --    N_Variable_Declaration,
629       --    --  Name:      variable name
630       --    --  Path_Name: not used
631       --    --  Expr_Kind: variable kind
632       --    --  Field1:    expression
633       --    --  Field2:    not used
634       --    --             Field3 is used for next variable, instead of Field2,
635       --    --             so that it is the same field for
636       --    --             N_Variable_Declaration and
637       --    --             N_Typed_Variable_Declaration
638       --    --  Field3:    next variable
639       --    --  Value:     not used
640
641       --    N_Expression,
642       --    --  Name:      not used
643       --    --  Path_Name: not used
644       --    --  Expr_Kind: expression kind
645       --    --  Field1:    first term
646       --    --  Field2:    next expression in list
647       --    --  Field3:    not used
648       --    --  Value:     not used
649
650       --    N_Term,
651       --    --  Name:      not used
652       --    --  Path_Name: not used
653       --    --  Expr_Kind: term kind
654       --    --  Field1:    current term
655       --    --  Field2:    next term in the expression
656       --    --  Field3:    not used
657       --    --  Value:     not used
658
659       --    N_Literal_String_List,
660       --    --  Designates a list of string expressions between brackets
661       --    --  separated by commas. The string expressions are not necessarily
662       --    --  literal strings.
663       --    --  Name:      not used
664       --    --  Path_Name: not used
665       --    --  Expr_Kind: List
666       --    --  Field1:    first expression
667       --    --  Field2:    not used
668       --    --  Field3:    not used
669       --    --  Value:     not used
670
671       --    N_Variable_Reference,
672       --    --  Name:      variable name
673       --    --  Path_Name: not used
674       --    --  Expr_Kind: variable kind
675       --    --  Field1:    project (if specified)
676       --    --  Field2:    package (if specified)
677       --    --  Field3:    type of variable (N_String_Type_Declaration), if any
678       --    --  Value:     not used
679
680       --    N_External_Value,
681       --    --  Name:      not used
682       --    --  Path_Name: not used
683       --    --  Expr_Kind: Single
684       --    --  Field1:    Name of the external reference (literal string)
685       --    --  Field2:    Default (literal string)
686       --    --  Field3:    not used
687       --    --  Value:     not used
688
689       --    N_Attribute_Reference,
690       --    --  Name:      attribute name
691       --    --  Path_Name: not used
692       --    --  Expr_Kind: attribute kind
693       --    --  Field1:    project
694       --    --  Field2:    package (if attribute of a package)
695       --    --  Field3:    not used
696       --    --  Value:     not used
697
698       --    N_Case_Construction,
699       --    --  Name:      not used
700       --    --  Path_Name: not used
701       --    --  Expr_Kind: Undefined
702       --    --  Field1:    case variable reference
703       --    --  Field2:    first case item
704       --    --  Field3:    not used
705       --    --  Value:     not used
706
707       --    N_Case_Item);
708       --    --  Name:      not used
709       --    --  Path_Name: not used
710       --    --  Expr_Kind: not used
711       --    --  Field1:    first choice (literal string)
712       --    --  Field2:    first declarative item
713       --    --  Field3:    next case item
714       --    --  Value:     not used
715
716       package Project_Nodes is
717          new Table.Table (Table_Component_Type => Project_Node_Record,
718                           Table_Index_Type     => Project_Node_Id,
719                           Table_Low_Bound      => First_Node_Id,
720                           Table_Initial        => Project_Nodes_Initial,
721                           Table_Increment      => Project_Nodes_Increment,
722                           Table_Name           => "Project_Nodes");
723       --  This table contains the syntactic tree of project data
724       --  from project files.
725
726       type Project_Name_And_Node is record
727          Name     : Name_Id;
728          --  Name of the project
729          Node     : Project_Node_Id;
730          --  Node of the project in table Project_Nodes
731          Modified : Boolean;
732          --  True when the project is being modified by another project
733       end record;
734
735       No_Project_Name_And_Node : constant Project_Name_And_Node :=
736         (Name => No_Name, Node => Empty_Node, Modified => True);
737
738       package Projects_Htable is new GNAT.HTable.Simple_HTable
739         (Header_Num => Header_Num,
740          Element    => Project_Name_And_Node,
741          No_Element => No_Project_Name_And_Node,
742          Key        => Name_Id,
743          Hash       => Hash,
744          Equal      => "=");
745       --  This hash table contains a mapping of project names to project nodes.
746       --  Note that this hash table contains only the nodes whose Kind is
747       --  N_Project. It is used to find the node of a project from its
748       --  name, and to verify if a project has already been parsed, knowing
749       --  its name.
750
751    end Tree_Private_Part;
752
753 end Prj.Tree;