OSDN Git Service

2007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
[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 --          Copyright (C) 2001-2007, 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 2,  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 COPYING.  If not, write --
19 -- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
20 -- Boston, MA 02110-1301, USA.                                              --
21 --                                                                          --
22 -- GNAT was originally developed  by the GNAT team at  New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
24 --                                                                          --
25 ------------------------------------------------------------------------------
26
27 --  This package defines the structure of the Project File tree
28
29 with GNAT.Dynamic_HTables;
30 with GNAT.Dynamic_Tables;
31
32 with Table;
33
34 with Prj.Attr; use Prj.Attr;
35
36 package Prj.Tree is
37
38    type Project_Node_Tree_Data;
39    type Project_Node_Tree_Ref is access all Project_Node_Tree_Data;
40    --  Type to designate a project node tree, so that several project node
41    --  trees can coexist in memory.
42
43    Project_Nodes_Initial   : constant := 1_000;
44    Project_Nodes_Increment : constant := 100;
45    --  Allocation parameters for initializing and extending number
46    --  of nodes in table Tree_Private_Part.Project_Nodes
47
48    Project_Node_Low_Bound  : constant := 0;
49    Project_Node_High_Bound : constant := 099_999_999;
50    --  Range of values for project node id's (in practice infinite)
51
52    type Project_Node_Id is range
53      Project_Node_Low_Bound .. Project_Node_High_Bound;
54    --  The index of table Tree_Private_Part.Project_Nodes
55
56    Empty_Node : constant Project_Node_Id := Project_Node_Low_Bound;
57    --  Designates no node in table Project_Nodes
58
59    First_Node_Id : constant Project_Node_Id := Project_Node_Low_Bound + 1;
60
61    subtype Variable_Node_Id is Project_Node_Id;
62    --  Used to designate a node whose expected kind is one of
63    --  N_Typed_Variable_Declaration, N_Variable_Declaration or
64    --  N_Variable_Reference.
65
66    subtype Package_Declaration_Id is Project_Node_Id;
67    --  Used to designate a node whose expected kind is N_Proect_Declaration
68
69    type Project_Node_Kind is
70      (N_Project,
71       N_With_Clause,
72       N_Project_Declaration,
73       N_Declarative_Item,
74       N_Package_Declaration,
75       N_String_Type_Declaration,
76       N_Literal_String,
77       N_Attribute_Declaration,
78       N_Typed_Variable_Declaration,
79       N_Variable_Declaration,
80       N_Expression,
81       N_Term,
82       N_Literal_String_List,
83       N_Variable_Reference,
84       N_External_Value,
85       N_Attribute_Reference,
86       N_Case_Construction,
87       N_Case_Item,
88       N_Comment_Zones,
89       N_Comment);
90    --  Each node in the tree is of a Project_Node_Kind. For the signification
91    --  of the fields in each node of Project_Node_Kind, look at package
92    --  Tree_Private_Part.
93
94    procedure Initialize (Tree : Project_Node_Tree_Ref);
95    --  Initialize the Project File tree: empty the Project_Nodes table
96    --  and reset the Projects_Htable.
97
98    function Default_Project_Node
99      (In_Tree       : Project_Node_Tree_Ref;
100       Of_Kind       : Project_Node_Kind;
101       And_Expr_Kind : Variable_Kind := Undefined) return Project_Node_Id;
102    --  Returns a Project_Node_Record with the specified Kind and Expr_Kind. All
103    --  the other components have default nil values.
104
105    function Hash (N : Project_Node_Id) return Header_Num;
106    --  Used for hash tables where the key is a Project_Node_Id
107
108    function Imported_Or_Extended_Project_Of
109      (Project   : Project_Node_Id;
110       In_Tree   : Project_Node_Tree_Ref;
111       With_Name : Name_Id) return Project_Node_Id;
112    --  Return the node of a project imported or extended by project Project and
113    --  whose name is With_Name. Return Empty_Node if there is no such project.
114
115    --------------
116    -- Comments --
117    --------------
118
119    type Comment_State is private;
120    --  A type to store the values of several global variables related to
121    --  comments.
122
123    procedure Save (S : out Comment_State);
124    --  Save in variable S the comment state. Called before scanning a new
125    --  project file.
126
127    procedure Restore (S : Comment_State);
128    --  Restore the comment state to a previously saved value. Called after
129    --  scanning a project file.
130
131    procedure Reset_State;
132    --  Set the comment state to its initial value. Called before scanning a
133    --  new project file.
134
135    function There_Are_Unkept_Comments return Boolean;
136    --  Indicates that some of the comments in a project file could not be
137    --  stored in the parse tree.
138
139    procedure Set_Previous_Line_Node (To : Project_Node_Id);
140    --  Indicate the node on the previous line. If there are comments
141    --  immediately following this line, then they should be associated with
142    --  this node.
143
144    procedure Set_Previous_End_Node (To : Project_Node_Id);
145    --  Indicate that on the previous line the "end" belongs to node To.
146    --  If there are comments immediately following this "end" line, they
147    --  should be associated with this node.
148
149    procedure Set_End_Of_Line (To : Project_Node_Id);
150    --  Indicate the node on the current line. If there is an end of line
151    --  comment, then it should be associated with this node.
152
153    procedure Set_Next_End_Node (To : Project_Node_Id);
154    --  Put node To on the top of the end node stack. When an END line is found
155    --  with this node on the top of the end node stack, the comments, if any,
156    --  immediately preceding this "end" line will be associated with this node.
157
158    procedure Remove_Next_End_Node;
159    --  Remove the top of the end node stack
160
161    ------------------------
162    -- Comment Processing --
163    ------------------------
164
165    type Comment_Data is record
166       Value                     : Name_Id := No_Name;
167       Follows_Empty_Line        : Boolean := False;
168       Is_Followed_By_Empty_Line : Boolean := False;
169    end record;
170    --  Component type for Comments Table below
171
172    package Comments is new Table.Table
173      (Table_Component_Type => Comment_Data,
174       Table_Index_Type     => Natural,
175       Table_Low_Bound      => 1,
176       Table_Initial        => 10,
177       Table_Increment      => 100,
178       Table_Name           => "Prj.Tree.Comments");
179    --  A table to store the comments that may be stored is the tree
180
181    procedure Scan (In_Tree : Project_Node_Tree_Ref);
182    --  Scan the tokens and accumulate comments
183
184    type Comment_Location is
185      (Before, After, Before_End, After_End, End_Of_Line);
186    --  Used in call to Add_Comments below
187
188    procedure Add_Comments
189      (To      : Project_Node_Id;
190       In_Tree : Project_Node_Tree_Ref;
191       Where   : Comment_Location);
192    --  Add comments to this node
193
194    ----------------------
195    -- Access Functions --
196    ----------------------
197
198    --  The following query functions are part of the abstract interface
199    --  of the Project File tree. They provide access to fields of a project.
200
201    --  The access functions should be called only with valid arguments.
202    --  For each function the condition of validity is specified. If an access
203    --  function is called with invalid arguments, then exception
204    --  Assertion_Error is raised if assertions are enabled, otherwise the
205    --  behaviour is not defined and may result in a crash.
206
207    function Name_Of
208      (Node    : Project_Node_Id;
209       In_Tree : Project_Node_Tree_Ref) return Name_Id;
210    pragma Inline (Name_Of);
211    --  Valid for all non empty nodes. May return No_Name for nodes that have
212    --  no names.
213
214    function Kind_Of
215      (Node    : Project_Node_Id;
216       In_Tree : Project_Node_Tree_Ref) return Project_Node_Kind;
217    pragma Inline (Kind_Of);
218    --  Valid for all non empty nodes
219
220    function Location_Of
221      (Node    : Project_Node_Id;
222       In_Tree : Project_Node_Tree_Ref) return Source_Ptr;
223    pragma Inline (Location_Of);
224    --  Valid for all non empty nodes
225
226    function First_Comment_After
227      (Node    : Project_Node_Id;
228       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
229    --  Valid only for N_Comment_Zones nodes
230
231    function First_Comment_After_End
232      (Node    : Project_Node_Id;
233       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
234    --  Valid only for N_Comment_Zones nodes
235
236    function First_Comment_Before
237      (Node    : Project_Node_Id;
238       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
239    --  Valid only for N_Comment_Zones nodes
240
241    function First_Comment_Before_End
242      (Node    : Project_Node_Id;
243       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
244    --  Valid only for N_Comment_Zones nodes
245
246    function Next_Comment
247      (Node    : Project_Node_Id;
248       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
249    --  Valid only for N_Comment nodes
250
251    function End_Of_Line_Comment
252      (Node    : Project_Node_Id;
253       In_Tree : Project_Node_Tree_Ref) return Name_Id;
254    --  Valid only for non empty nodes
255
256    function Follows_Empty_Line
257      (Node    : Project_Node_Id;
258       In_Tree : Project_Node_Tree_Ref) return Boolean;
259    --  Valid only for N_Comment nodes
260
261    function Is_Followed_By_Empty_Line
262      (Node    : Project_Node_Id;
263       In_Tree : Project_Node_Tree_Ref) return Boolean;
264    --  Valid only for N_Comment nodes
265
266    function Project_File_Includes_Unkept_Comments
267      (Node    : Project_Node_Id;
268       In_Tree : Project_Node_Tree_Ref)
269       return Boolean;
270    --  Valid only for N_Project nodes
271
272    function Directory_Of
273      (Node    : Project_Node_Id;
274       In_Tree : Project_Node_Tree_Ref) return Path_Name_Type;
275    pragma Inline (Directory_Of);
276    --  Only valid for N_Project nodes
277
278    function Expression_Kind_Of
279      (Node    : Project_Node_Id;
280       In_Tree : Project_Node_Tree_Ref) return Variable_Kind;
281    pragma Inline (Expression_Kind_Of);
282    --  Only valid for N_Literal_String, N_Attribute_Declaration,
283    --  N_Variable_Declaration, N_Typed_Variable_Declaration, N_Expression,
284    --  N_Term, N_Variable_Reference or N_Attribute_Reference nodes.
285
286    function Is_Extending_All
287      (Node    : Project_Node_Id;
288       In_Tree : Project_Node_Tree_Ref) return Boolean;
289    pragma Inline (Is_Extending_All);
290    --  Only valid for N_Project and N_With_Clause
291
292    function Is_Not_Last_In_List
293      (Node    : Project_Node_Id;
294       In_Tree : Project_Node_Tree_Ref) return Boolean;
295    pragma Inline (Is_Not_Last_In_List);
296    --  Only valid for N_With_Clause
297
298    function First_Variable_Of
299      (Node    : Project_Node_Id;
300       In_Tree : Project_Node_Tree_Ref) return Variable_Node_Id;
301    pragma Inline (First_Variable_Of);
302    --  Only valid for N_Project or N_Package_Declaration nodes
303
304    function First_Package_Of
305      (Node    : Project_Node_Id;
306       In_Tree : Project_Node_Tree_Ref) return Package_Declaration_Id;
307    pragma Inline (First_Package_Of);
308    --  Only valid for N_Project nodes
309
310    function Package_Id_Of
311      (Node    : Project_Node_Id;
312       In_Tree : Project_Node_Tree_Ref) return Package_Node_Id;
313    pragma Inline (Package_Id_Of);
314    --  Only valid for N_Package_Declaration nodes
315
316    function Path_Name_Of
317      (Node    : Project_Node_Id;
318       In_Tree : Project_Node_Tree_Ref) return Path_Name_Type;
319    pragma Inline (Path_Name_Of);
320    --  Only valid for N_Project and N_With_Clause nodes
321
322    function String_Value_Of
323      (Node    : Project_Node_Id;
324       In_Tree : Project_Node_Tree_Ref) return Name_Id;
325    pragma Inline (String_Value_Of);
326    --  Only valid for N_With_Clause, N_Literal_String nodes or N_Comment.
327    --  For a N_With_Clause created automatically for a virtual extending
328    --  project, No_Name is returned.
329
330    function Source_Index_Of
331      (Node    : Project_Node_Id;
332       In_Tree : Project_Node_Tree_Ref) return Int;
333    pragma Inline (Source_Index_Of);
334    --  Only valid for N_Literal_String and N_Attribute_Declaration nodes
335
336    function First_With_Clause_Of
337      (Node    : Project_Node_Id;
338       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
339    pragma Inline (First_With_Clause_Of);
340    --  Only valid for N_Project nodes
341
342    function Project_Declaration_Of
343      (Node    : Project_Node_Id;
344       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
345    pragma Inline (Project_Declaration_Of);
346    --  Only valid for N_Project nodes
347
348    function Extending_Project_Of
349      (Node    : Project_Node_Id;
350       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
351    pragma Inline (Extending_Project_Of);
352    --  Only valid for N_Project_Declaration nodes
353
354    function First_String_Type_Of
355      (Node    : Project_Node_Id;
356       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
357    pragma Inline (First_String_Type_Of);
358    --  Only valid for N_Project nodes
359
360    function Extended_Project_Path_Of
361      (Node    : Project_Node_Id;
362       In_Tree : Project_Node_Tree_Ref) return Path_Name_Type;
363    pragma Inline (Extended_Project_Path_Of);
364    --  Only valid for N_With_Clause nodes
365
366    function Project_Node_Of
367      (Node    : Project_Node_Id;
368       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
369    pragma Inline (Project_Node_Of);
370    --  Only valid for N_With_Clause, N_Variable_Reference and
371    --  N_Attribute_Reference nodes.
372
373    function Non_Limited_Project_Node_Of
374      (Node    : Project_Node_Id;
375       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
376    pragma Inline (Non_Limited_Project_Node_Of);
377    --  Only valid for N_With_Clause nodes. Returns Empty_Node for limited
378    --  imported project files, otherwise returns the same result as
379    --  Project_Node_Of.
380
381    function Next_With_Clause_Of
382      (Node    : Project_Node_Id;
383       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
384    pragma Inline (Next_With_Clause_Of);
385    --  Only valid for N_With_Clause nodes
386
387    function First_Declarative_Item_Of
388      (Node    : Project_Node_Id;
389       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
390    pragma Inline (First_Declarative_Item_Of);
391    --  Only valid for N_With_Clause nodes
392
393    function Extended_Project_Of
394      (Node    : Project_Node_Id;
395       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
396    pragma Inline (Extended_Project_Of);
397    --  Only valid for N_Project_Declaration nodes
398
399    function Current_Item_Node
400      (Node    : Project_Node_Id;
401       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
402    pragma Inline (Current_Item_Node);
403    --  Only valid for N_Declarative_Item nodes
404
405    function Next_Declarative_Item
406      (Node    : Project_Node_Id;
407       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
408    pragma Inline (Next_Declarative_Item);
409    --  Only valid for N_Declarative_Item node
410
411    function Project_Of_Renamed_Package_Of
412      (Node    : Project_Node_Id;
413       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
414    pragma Inline (Project_Of_Renamed_Package_Of);
415    --  Only valid for N_Package_Declaration nodes.
416    --  May return Empty_Node.
417
418    function Next_Package_In_Project
419      (Node    : Project_Node_Id;
420       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
421    pragma Inline (Next_Package_In_Project);
422    --  Only valid for N_Package_Declaration nodes
423
424    function First_Literal_String
425      (Node    : Project_Node_Id;
426       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
427    pragma Inline (First_Literal_String);
428    --  Only valid for N_String_Type_Declaration nodes
429
430    function Next_String_Type
431      (Node    : Project_Node_Id;
432       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
433    pragma Inline (Next_String_Type);
434    --  Only valid for N_String_Type_Declaration nodes
435
436    function Next_Literal_String
437      (Node    : Project_Node_Id;
438       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
439    pragma Inline (Next_Literal_String);
440    --  Only valid for N_Literal_String nodes
441
442    function Expression_Of
443      (Node    : Project_Node_Id;
444       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
445    pragma Inline (Expression_Of);
446    --  Only valid for N_Attribute_Declaration, N_Typed_Variable_Declaration
447    --  or N_Variable_Declaration nodes
448
449    function Associative_Project_Of
450      (Node    : Project_Node_Id;
451       In_Tree : Project_Node_Tree_Ref)
452       return  Project_Node_Id;
453    pragma Inline (Associative_Project_Of);
454    --  Only valid for N_Attribute_Declaration nodes
455
456    function Associative_Package_Of
457      (Node    : Project_Node_Id;
458       In_Tree : Project_Node_Tree_Ref)
459       return  Project_Node_Id;
460    pragma Inline (Associative_Package_Of);
461    --  Only valid for N_Attribute_Declaration nodes
462
463    function Value_Is_Valid
464      (For_Typed_Variable : Project_Node_Id;
465       In_Tree            : Project_Node_Tree_Ref;
466       Value              : Name_Id) return Boolean;
467    pragma Inline (Value_Is_Valid);
468    --  Only valid for N_Typed_Variable_Declaration. Returns True if Value is
469    --  in the list of allowed strings for For_Typed_Variable. False otherwise.
470
471    function Associative_Array_Index_Of
472      (Node    : Project_Node_Id;
473       In_Tree : Project_Node_Tree_Ref) return Name_Id;
474    pragma Inline (Associative_Array_Index_Of);
475    --  Only valid for N_Attribute_Declaration and N_Attribute_Reference.
476    --  Returns No_String for non associative array attributes.
477
478    function Next_Variable
479      (Node    : Project_Node_Id;
480       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
481    pragma Inline (Next_Variable);
482    --  Only valid for N_Typed_Variable_Declaration or N_Variable_Declaration
483    --  nodes.
484
485    function First_Term
486      (Node    : Project_Node_Id;
487       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
488    pragma Inline (First_Term);
489    --  Only valid for N_Expression nodes
490
491    function Next_Expression_In_List
492      (Node    : Project_Node_Id;
493       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
494    pragma Inline (Next_Expression_In_List);
495    --  Only valid for N_Expression nodes
496
497    function Current_Term
498      (Node    : Project_Node_Id;
499       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
500    pragma Inline (Current_Term);
501    --  Only valid for N_Term nodes
502
503    function Next_Term
504      (Node    : Project_Node_Id;
505       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
506    pragma Inline (Next_Term);
507    --  Only valid for N_Term nodes
508
509    function First_Expression_In_List
510      (Node    : Project_Node_Id;
511       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
512    pragma Inline (First_Expression_In_List);
513    --  Only valid for N_Literal_String_List nodes
514
515    function Package_Node_Of
516      (Node    : Project_Node_Id;
517       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
518    pragma Inline (Package_Node_Of);
519    --  Only valid for N_Variable_Reference or N_Attribute_Reference nodes.
520    --  May return Empty_Node.
521
522    function String_Type_Of
523      (Node    : Project_Node_Id;
524       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
525    pragma Inline (String_Type_Of);
526    --  Only valid for N_Variable_Reference or N_Typed_Variable_Declaration
527    --  nodes.
528
529    function External_Reference_Of
530      (Node    : Project_Node_Id;
531       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
532    pragma Inline (External_Reference_Of);
533    --  Only valid for N_External_Value nodes
534
535    function External_Default_Of
536      (Node    : Project_Node_Id;
537       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
538    pragma Inline (External_Default_Of);
539    --  Only valid for N_External_Value nodes
540
541    function Case_Variable_Reference_Of
542      (Node    : Project_Node_Id;
543       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
544    pragma Inline (Case_Variable_Reference_Of);
545    --  Only valid for N_Case_Construction nodes
546
547    function First_Case_Item_Of
548      (Node    : Project_Node_Id;
549       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
550    pragma Inline (First_Case_Item_Of);
551    --  Only valid for N_Case_Construction nodes
552
553    function First_Choice_Of
554      (Node    : Project_Node_Id;
555       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
556    pragma Inline (First_Choice_Of);
557    --  Return the first choice in a N_Case_Item, or Empty_Node if
558    --  this is when others.
559
560    function Next_Case_Item
561      (Node    : Project_Node_Id;
562       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
563    pragma Inline (Next_Case_Item);
564    --  Only valid for N_Case_Item nodes
565
566    function Case_Insensitive
567      (Node    : Project_Node_Id;
568       In_Tree : Project_Node_Tree_Ref) return Boolean;
569    --  Only valid for N_Attribute_Declaration and N_Attribute_Reference nodes
570
571    --------------------
572    -- Set Procedures --
573    --------------------
574
575    --  The following procedures are part of the abstract interface of
576    --  the Project File tree.
577
578    --  Each Set_* procedure is valid only for the same Project_Node_Kind
579    --  nodes as the corresponding query function above.
580
581    procedure Set_Name_Of
582      (Node    : Project_Node_Id;
583       In_Tree : Project_Node_Tree_Ref;
584       To      : Name_Id);
585    pragma Inline (Set_Name_Of);
586
587    procedure Set_Kind_Of
588      (Node    : Project_Node_Id;
589       In_Tree : Project_Node_Tree_Ref;
590       To      : Project_Node_Kind);
591    pragma Inline (Set_Kind_Of);
592
593    procedure Set_Location_Of
594      (Node    : Project_Node_Id;
595       In_Tree : Project_Node_Tree_Ref;
596       To      : Source_Ptr);
597    pragma Inline (Set_Location_Of);
598
599    procedure Set_First_Comment_After
600      (Node    : Project_Node_Id;
601       In_Tree : Project_Node_Tree_Ref;
602       To      : Project_Node_Id);
603    pragma Inline (Set_First_Comment_After);
604
605    procedure Set_First_Comment_After_End
606      (Node    : Project_Node_Id;
607       In_Tree : Project_Node_Tree_Ref;
608       To      : Project_Node_Id);
609    pragma Inline (Set_First_Comment_After_End);
610
611    procedure Set_First_Comment_Before
612      (Node    : Project_Node_Id;
613       In_Tree : Project_Node_Tree_Ref;
614       To      : Project_Node_Id);
615    pragma Inline (Set_First_Comment_Before);
616
617    procedure Set_First_Comment_Before_End
618      (Node    : Project_Node_Id;
619       In_Tree : Project_Node_Tree_Ref;
620       To      : Project_Node_Id);
621    pragma Inline (Set_First_Comment_Before_End);
622
623    procedure Set_Next_Comment
624      (Node    : Project_Node_Id;
625       In_Tree : Project_Node_Tree_Ref;
626       To      : Project_Node_Id);
627    pragma Inline (Set_Next_Comment);
628
629    procedure Set_Project_File_Includes_Unkept_Comments
630      (Node    : Project_Node_Id;
631       In_Tree : Project_Node_Tree_Ref;
632       To      : Boolean);
633
634    procedure Set_Directory_Of
635      (Node    : Project_Node_Id;
636       In_Tree : Project_Node_Tree_Ref;
637       To      : Path_Name_Type);
638    pragma Inline (Set_Directory_Of);
639
640    procedure Set_Expression_Kind_Of
641      (Node    : Project_Node_Id;
642       In_Tree : Project_Node_Tree_Ref;
643       To      : Variable_Kind);
644    pragma Inline (Set_Expression_Kind_Of);
645
646    procedure Set_Is_Extending_All
647      (Node    : Project_Node_Id;
648       In_Tree : Project_Node_Tree_Ref);
649    pragma Inline (Set_Is_Extending_All);
650
651    procedure Set_Is_Not_Last_In_List
652      (Node    : Project_Node_Id;
653       In_Tree : Project_Node_Tree_Ref);
654    pragma Inline (Set_Is_Not_Last_In_List);
655
656    procedure Set_First_Variable_Of
657      (Node    : Project_Node_Id;
658       In_Tree : Project_Node_Tree_Ref;
659       To      : Variable_Node_Id);
660    pragma Inline (Set_First_Variable_Of);
661
662    procedure Set_First_Package_Of
663      (Node    : Project_Node_Id;
664       In_Tree : Project_Node_Tree_Ref;
665       To      : Package_Declaration_Id);
666    pragma Inline (Set_First_Package_Of);
667
668    procedure Set_Package_Id_Of
669      (Node    : Project_Node_Id;
670       In_Tree : Project_Node_Tree_Ref;
671       To      : Package_Node_Id);
672    pragma Inline (Set_Package_Id_Of);
673
674    procedure Set_Path_Name_Of
675      (Node    : Project_Node_Id;
676       In_Tree : Project_Node_Tree_Ref;
677       To      : Path_Name_Type);
678    pragma Inline (Set_Path_Name_Of);
679
680    procedure Set_String_Value_Of
681      (Node    : Project_Node_Id;
682       In_Tree : Project_Node_Tree_Ref;
683       To      : Name_Id);
684    pragma Inline (Set_String_Value_Of);
685
686    procedure Set_First_With_Clause_Of
687      (Node    : Project_Node_Id;
688       In_Tree : Project_Node_Tree_Ref;
689       To      : Project_Node_Id);
690    pragma Inline (Set_First_With_Clause_Of);
691
692    procedure Set_Project_Declaration_Of
693      (Node    : Project_Node_Id;
694       In_Tree : Project_Node_Tree_Ref;
695       To      : Project_Node_Id);
696    pragma Inline (Set_Project_Declaration_Of);
697
698    procedure Set_Extending_Project_Of
699      (Node    : Project_Node_Id;
700       In_Tree : Project_Node_Tree_Ref;
701       To      : Project_Node_Id);
702    pragma Inline (Set_Extending_Project_Of);
703
704    procedure Set_First_String_Type_Of
705      (Node    : Project_Node_Id;
706       In_Tree : Project_Node_Tree_Ref;
707       To      : Project_Node_Id);
708    pragma Inline (Set_First_String_Type_Of);
709
710    procedure Set_Extended_Project_Path_Of
711      (Node    : Project_Node_Id;
712       In_Tree : Project_Node_Tree_Ref;
713       To      : Path_Name_Type);
714    pragma Inline (Set_Extended_Project_Path_Of);
715
716    procedure Set_Project_Node_Of
717      (Node         : Project_Node_Id;
718       In_Tree      : Project_Node_Tree_Ref;
719       To           : Project_Node_Id;
720       Limited_With : Boolean := False);
721    pragma Inline (Set_Project_Node_Of);
722
723    procedure Set_Next_With_Clause_Of
724      (Node    : Project_Node_Id;
725       In_Tree : Project_Node_Tree_Ref;
726       To      : Project_Node_Id);
727    pragma Inline (Set_Next_With_Clause_Of);
728
729    procedure Set_First_Declarative_Item_Of
730      (Node    : Project_Node_Id;
731       In_Tree : Project_Node_Tree_Ref;
732       To      : Project_Node_Id);
733    pragma Inline (Set_First_Declarative_Item_Of);
734
735    procedure Set_Extended_Project_Of
736      (Node    : Project_Node_Id;
737       In_Tree : Project_Node_Tree_Ref;
738       To      : Project_Node_Id);
739    pragma Inline (Set_Extended_Project_Of);
740
741    procedure Set_Current_Item_Node
742      (Node    : Project_Node_Id;
743       In_Tree : Project_Node_Tree_Ref;
744       To      : Project_Node_Id);
745    pragma Inline (Set_Current_Item_Node);
746
747    procedure Set_Next_Declarative_Item
748      (Node    : Project_Node_Id;
749       In_Tree : Project_Node_Tree_Ref;
750       To      : Project_Node_Id);
751    pragma Inline (Set_Next_Declarative_Item);
752
753    procedure Set_Project_Of_Renamed_Package_Of
754      (Node    : Project_Node_Id;
755       In_Tree : Project_Node_Tree_Ref;
756       To      : Project_Node_Id);
757    pragma Inline (Set_Project_Of_Renamed_Package_Of);
758
759    procedure Set_Next_Package_In_Project
760      (Node    : Project_Node_Id;
761       In_Tree : Project_Node_Tree_Ref;
762       To      : Project_Node_Id);
763    pragma Inline (Set_Next_Package_In_Project);
764
765    procedure Set_First_Literal_String
766      (Node    : Project_Node_Id;
767       In_Tree : Project_Node_Tree_Ref;
768       To      : Project_Node_Id);
769    pragma Inline (Set_First_Literal_String);
770
771    procedure Set_Next_String_Type
772      (Node    : Project_Node_Id;
773       In_Tree : Project_Node_Tree_Ref;
774       To      : Project_Node_Id);
775    pragma Inline (Set_Next_String_Type);
776
777    procedure Set_Next_Literal_String
778      (Node    : Project_Node_Id;
779       In_Tree : Project_Node_Tree_Ref;
780       To      : Project_Node_Id);
781    pragma Inline (Set_Next_Literal_String);
782
783    procedure Set_Expression_Of
784      (Node    : Project_Node_Id;
785       In_Tree : Project_Node_Tree_Ref;
786       To      : Project_Node_Id);
787    pragma Inline (Set_Expression_Of);
788
789    procedure Set_Associative_Project_Of
790      (Node    : Project_Node_Id;
791       In_Tree : Project_Node_Tree_Ref;
792       To      : Project_Node_Id);
793    pragma Inline (Set_Associative_Project_Of);
794
795    procedure Set_Associative_Package_Of
796      (Node    : Project_Node_Id;
797       In_Tree : Project_Node_Tree_Ref;
798       To      : Project_Node_Id);
799    pragma Inline (Set_Associative_Package_Of);
800
801    procedure Set_Associative_Array_Index_Of
802      (Node    : Project_Node_Id;
803       In_Tree : Project_Node_Tree_Ref;
804       To      : Name_Id);
805    pragma Inline (Set_Associative_Array_Index_Of);
806
807    procedure Set_Next_Variable
808      (Node    : Project_Node_Id;
809       In_Tree : Project_Node_Tree_Ref;
810       To      : Project_Node_Id);
811    pragma Inline (Set_Next_Variable);
812
813    procedure Set_First_Term
814      (Node    : Project_Node_Id;
815       In_Tree : Project_Node_Tree_Ref;
816       To      : Project_Node_Id);
817    pragma Inline (Set_First_Term);
818
819    procedure Set_Next_Expression_In_List
820      (Node    : Project_Node_Id;
821       In_Tree : Project_Node_Tree_Ref;
822       To      : Project_Node_Id);
823    pragma Inline (Set_Next_Expression_In_List);
824
825    procedure Set_Current_Term
826      (Node    : Project_Node_Id;
827       In_Tree : Project_Node_Tree_Ref;
828       To      : Project_Node_Id);
829    pragma Inline (Set_Current_Term);
830
831    procedure Set_Next_Term
832      (Node    : Project_Node_Id;
833       In_Tree : Project_Node_Tree_Ref;
834       To      : Project_Node_Id);
835    pragma Inline (Set_Next_Term);
836
837    procedure Set_First_Expression_In_List
838      (Node    : Project_Node_Id;
839       In_Tree : Project_Node_Tree_Ref;
840       To      : Project_Node_Id);
841    pragma Inline (Set_First_Expression_In_List);
842
843    procedure Set_Package_Node_Of
844      (Node    : Project_Node_Id;
845       In_Tree : Project_Node_Tree_Ref;
846       To      : Project_Node_Id);
847    pragma Inline (Set_Package_Node_Of);
848
849    procedure Set_Source_Index_Of
850      (Node    : Project_Node_Id;
851       In_Tree : Project_Node_Tree_Ref;
852       To      : Int);
853    pragma Inline (Set_Source_Index_Of);
854
855    procedure Set_String_Type_Of
856      (Node    : Project_Node_Id;
857       In_Tree : Project_Node_Tree_Ref;
858       To      : Project_Node_Id);
859    pragma Inline (Set_String_Type_Of);
860
861    procedure Set_External_Reference_Of
862      (Node    : Project_Node_Id;
863       In_Tree : Project_Node_Tree_Ref;
864       To      : Project_Node_Id);
865    pragma Inline (Set_External_Reference_Of);
866
867    procedure Set_External_Default_Of
868      (Node    : Project_Node_Id;
869       In_Tree : Project_Node_Tree_Ref;
870       To      : Project_Node_Id);
871    pragma Inline (Set_External_Default_Of);
872
873    procedure Set_Case_Variable_Reference_Of
874      (Node    : Project_Node_Id;
875       In_Tree : Project_Node_Tree_Ref;
876       To      : Project_Node_Id);
877    pragma Inline (Set_Case_Variable_Reference_Of);
878
879    procedure Set_First_Case_Item_Of
880      (Node    : Project_Node_Id;
881       In_Tree : Project_Node_Tree_Ref;
882       To      : Project_Node_Id);
883    pragma Inline (Set_First_Case_Item_Of);
884
885    procedure Set_First_Choice_Of
886      (Node    : Project_Node_Id;
887       In_Tree : Project_Node_Tree_Ref;
888       To      : Project_Node_Id);
889    pragma Inline (Set_First_Choice_Of);
890
891    procedure Set_Next_Case_Item
892      (Node    : Project_Node_Id;
893       In_Tree : Project_Node_Tree_Ref;
894       To      : Project_Node_Id);
895    pragma Inline (Set_Next_Case_Item);
896
897    procedure Set_Case_Insensitive
898      (Node    : Project_Node_Id;
899       In_Tree : Project_Node_Tree_Ref;
900       To      : Boolean);
901
902    -------------------------------
903    -- Restricted Access Section --
904    -------------------------------
905
906    package Tree_Private_Part is
907
908       --  This is conceptually in the private part
909
910       --  However, for efficiency, some packages are accessing it directly
911
912       type Project_Node_Record is record
913
914          Kind : Project_Node_Kind;
915
916          Location : Source_Ptr := No_Location;
917
918          Directory : Path_Name_Type := No_Path;
919          --  Only for N_Project
920
921          Expr_Kind : Variable_Kind := Undefined;
922          --  See below for what Project_Node_Kind it is used
923
924          Variables : Variable_Node_Id := Empty_Node;
925          --  First variable in a project or a package
926
927          Packages : Package_Declaration_Id := Empty_Node;
928          --  First package declaration in a project
929
930          Pkg_Id : Package_Node_Id := Empty_Package;
931          --  Only used for N_Package_Declaration
932          --  The component Pkg_Id is an entry into the table Package_Attributes
933          --  (in Prj.Attr). It is used to indicate all the attributes of the
934          --  package with their characteristics.
935          --
936          --  The tables Prj.Attr.Attributes and Prj.Attr.Package_Attributes
937          --  are built once and for all through a call (from Prj.Initialize)
938          --  to procedure Prj.Attr.Initialize. It is never modified after that.
939
940          Name : Name_Id := No_Name;
941          --  See below for what Project_Node_Kind it is used
942
943          Src_Index : Int := 0;
944          --  Index of a unit in a multi-unit source.
945          --  Onli for some N_Attribute_Declaration and N_Literal_String.
946
947          Path_Name : Path_Name_Type := No_Path;
948          --  See below for what Project_Node_Kind it is used
949
950          Value : Name_Id := No_Name;
951          --  See below for what Project_Node_Kind it is used
952
953          Field1 : Project_Node_Id := Empty_Node;
954          --  See below the meaning for each Project_Node_Kind
955
956          Field2 : Project_Node_Id := Empty_Node;
957          --  See below the meaning for each Project_Node_Kind
958
959          Field3 : Project_Node_Id := Empty_Node;
960          --  See below the meaning for each Project_Node_Kind
961
962          Flag1 : Boolean := False;
963          --  This flag is significant only for:
964          --    N_Attribute_Declaration and N_Atribute_Reference
965          --      It indicates for an associative array attribute, that the
966          --      index is case insensitive.
967          --    N_Comment - it indicates that the comment is preceded by an
968          --                empty line.
969          --    N_Project - it indicates that there are comments in the project
970          --                source that cannot be kept in the tree.
971          --    N_Project_Declaration
972          --              - it indicates that there are unkept comments in the
973          --                project.
974          --    N_With_Clause
975          --              - it indicates that this is not the last with in a
976          --                with clause. It is set for "A", but not for "B" in
977          --                    with "B";
978          --                  and
979          --                    with "A", "B";
980
981          Flag2 : Boolean := False;
982          --  This flag is significant only for:
983          --    N_Project - it indicates that the project "extends all" another
984          --                project.
985          --    N_Comment - it indicates that the comment is followed by an
986          --                empty line.
987          --    N_With_Clause
988          --              - it indicates that the originally imported project
989          --                is an extending all project.
990
991          Comments : Project_Node_Id := Empty_Node;
992          --  For nodes other that N_Comment_Zones or N_Comment, designates the
993          --  comment zones associated with the node.
994          --  for N_Comment_Zones, designates the comment after the "end" of
995          --  the construct.
996          --  For N_Comment, designates the next comment, if any.
997
998       end record;
999
1000       --  type Project_Node_Kind is
1001
1002       --   (N_Project,
1003       --    --  Name:      project name
1004       --    --  Path_Name: project path name
1005       --    --  Expr_Kind: Undefined
1006       --    --  Field1:    first with clause
1007       --    --  Field2:    project declaration
1008       --    --  Field3:    first string type
1009       --    --  Value:     extended project path name (if any)
1010
1011       --    N_With_Clause,
1012       --    --  Name:      imported project name
1013       --    --  Path_Name: imported project path name
1014       --    --  Expr_Kind: Undefined
1015       --    --  Field1:    project node
1016       --    --  Field2:    next with clause
1017       --    --  Field3:    project node or empty if "limited with"
1018       --    --  Value:     literal string withed
1019
1020       --    N_Project_Declaration,
1021       --    --  Name:      not used
1022       --    --  Path_Name: not used
1023       --    --  Expr_Kind: Undefined
1024       --    --  Field1:    first declarative item
1025       --    --  Field2:    extended project
1026       --    --  Field3:    extending project
1027       --    --  Value:     not used
1028
1029       --    N_Declarative_Item,
1030       --    --  Name:      not used
1031       --    --  Path_Name: not used
1032       --    --  Expr_Kind: Undefined
1033       --    --  Field1:    current item node
1034       --    --  Field2:    next declarative item
1035       --    --  Field3:    not used
1036       --    --  Value:     not used
1037
1038       --    N_Package_Declaration,
1039       --    --  Name:      package name
1040       --    --  Path_Name: not used
1041       --    --  Expr_Kind: Undefined
1042       --    --  Field1:    project of renamed package (if any)
1043       --    --  Field2:    first declarative item
1044       --    --  Field3:    next package in project
1045       --    --  Value:     not used
1046
1047       --    N_String_Type_Declaration,
1048       --    --  Name:      type name
1049       --    --  Path_Name: not used
1050       --    --  Expr_Kind: Undefined
1051       --    --  Field1:    first literal string
1052       --    --  Field2:    next string type
1053       --    --  Field3:    not used
1054       --    --  Value:     not used
1055
1056       --    N_Literal_String,
1057       --    --  Name:      not used
1058       --    --  Path_Name: not used
1059       --    --  Expr_Kind: Single
1060       --    --  Field1:    next literal string
1061       --    --  Field2:    not used
1062       --    --  Field3:    not used
1063       --    --  Value:     string value
1064
1065       --    N_Attribute_Declaration,
1066       --    --  Name:      attribute name
1067       --    --  Path_Name: not used
1068       --    --  Expr_Kind: attribute kind
1069       --    --  Field1:    expression
1070       --    --  Field2:    project of full associative array
1071       --    --  Field3:    package of full associative array
1072       --    --  Value:     associative array index
1073       --    --             (if an associative array element)
1074
1075       --    N_Typed_Variable_Declaration,
1076       --    --  Name:      variable name
1077       --    --  Path_Name: not used
1078       --    --  Expr_Kind: Single
1079       --    --  Field1:    expression
1080       --    --  Field2:    type of variable (N_String_Type_Declaration)
1081       --    --  Field3:    next variable
1082       --    --  Value:     not used
1083
1084       --    N_Variable_Declaration,
1085       --    --  Name:      variable name
1086       --    --  Path_Name: not used
1087       --    --  Expr_Kind: variable kind
1088       --    --  Field1:    expression
1089       --    --  Field2:    not used
1090       --    --             Field3 is used for next variable, instead of Field2,
1091       --    --             so that it is the same field for
1092       --    --             N_Variable_Declaration and
1093       --    --             N_Typed_Variable_Declaration
1094       --    --  Field3:    next variable
1095       --    --  Value:     not used
1096
1097       --    N_Expression,
1098       --    --  Name:      not used
1099       --    --  Path_Name: not used
1100       --    --  Expr_Kind: expression kind
1101       --    --  Field1:    first term
1102       --    --  Field2:    next expression in list
1103       --    --  Field3:    not used
1104       --    --  Value:     not used
1105
1106       --    N_Term,
1107       --    --  Name:      not used
1108       --    --  Path_Name: not used
1109       --    --  Expr_Kind: term kind
1110       --    --  Field1:    current term
1111       --    --  Field2:    next term in the expression
1112       --    --  Field3:    not used
1113       --    --  Value:     not used
1114
1115       --    N_Literal_String_List,
1116       --    --  Designates a list of string expressions between brackets
1117       --    --  separated by commas. The string expressions are not necessarily
1118       --    --  literal strings.
1119       --    --  Name:      not used
1120       --    --  Path_Name: not used
1121       --    --  Expr_Kind: List
1122       --    --  Field1:    first expression
1123       --    --  Field2:    not used
1124       --    --  Field3:    not used
1125       --    --  Value:     not used
1126
1127       --    N_Variable_Reference,
1128       --    --  Name:      variable name
1129       --    --  Path_Name: not used
1130       --    --  Expr_Kind: variable kind
1131       --    --  Field1:    project (if specified)
1132       --    --  Field2:    package (if specified)
1133       --    --  Field3:    type of variable (N_String_Type_Declaration), if any
1134       --    --  Value:     not used
1135
1136       --    N_External_Value,
1137       --    --  Name:      not used
1138       --    --  Path_Name: not used
1139       --    --  Expr_Kind: Single
1140       --    --  Field1:    Name of the external reference (literal string)
1141       --    --  Field2:    Default (literal string)
1142       --    --  Field3:    not used
1143       --    --  Value:     not used
1144
1145       --    N_Attribute_Reference,
1146       --    --  Name:      attribute name
1147       --    --  Path_Name: not used
1148       --    --  Expr_Kind: attribute kind
1149       --    --  Field1:    project
1150       --    --  Field2:    package (if attribute of a package)
1151       --    --  Field3:    not used
1152       --    --  Value:     associative array index
1153       --    --             (if an associative array element)
1154
1155       --    N_Case_Construction,
1156       --    --  Name:      not used
1157       --    --  Path_Name: not used
1158       --    --  Expr_Kind: Undefined
1159       --    --  Field1:    case variable reference
1160       --    --  Field2:    first case item
1161       --    --  Field3:    not used
1162       --    --  Value:     not used
1163
1164       --    N_Case_Item
1165       --    --  Name:      not used
1166       --    --  Path_Name: not used
1167       --    --  Expr_Kind: not used
1168       --    --  Field1:    first choice (literal string), or Empty_Node
1169       --    --             for when others
1170       --    --  Field2:    first declarative item
1171       --    --  Field3:    next case item
1172       --    --  Value:     not used
1173
1174       --    N_Comment_zones
1175       --    --  Name:      not used
1176       --    --  Path_Name: not used
1177       --    --  Expr_Kind: not used
1178       --    --  Field1:    comment before the construct
1179       --    --  Field2:    comment after the construct
1180       --    --  Field3:    comment before the "end" of the construct
1181       --    --  Value:     end of line comment
1182       --    --  Comments:  comment after the "end" of the construct
1183
1184       --    N_Comment
1185       --    --  Name:      not used
1186       --    --  Path_Name: not used
1187       --    --  Expr_Kind: not used
1188       --    --  Field1:    not used
1189       --    --  Field2:    not used
1190       --    --  Field3:    not used
1191       --    --  Value:     comment
1192       --    --  Flag1:     comment is preceded by an empty line
1193       --    --  Flag2:     comment is followed by an empty line
1194       --    --  Comments:  next comment
1195
1196       package Project_Node_Table is
1197         new GNAT.Dynamic_Tables
1198           (Table_Component_Type => Project_Node_Record,
1199            Table_Index_Type     => Project_Node_Id,
1200            Table_Low_Bound      => First_Node_Id,
1201            Table_Initial        => Project_Nodes_Initial,
1202            Table_Increment      => Project_Nodes_Increment);
1203       --  This table contains the syntactic tree of project data
1204       --  from project files.
1205
1206       type Project_Name_And_Node is record
1207          Name : Name_Id;
1208          --  Name of the project
1209
1210          Node : Project_Node_Id;
1211          --  Node of the project in table Project_Nodes
1212
1213          Canonical_Path : Path_Name_Type;
1214          --  Resolved and canonical path of a real project file.
1215          --  No_Name in case of virtual projects.
1216
1217          Extended : Boolean;
1218          --  True when the project is being extended by another project
1219       end record;
1220
1221       No_Project_Name_And_Node : constant Project_Name_And_Node :=
1222         (Name           => No_Name,
1223          Node           => Empty_Node,
1224          Canonical_Path => No_Path,
1225          Extended       => True);
1226
1227       package Projects_Htable is new GNAT.Dynamic_HTables.Simple_HTable
1228         (Header_Num => Header_Num,
1229          Element    => Project_Name_And_Node,
1230          No_Element => No_Project_Name_And_Node,
1231          Key        => Name_Id,
1232          Hash       => Hash,
1233          Equal      => "=");
1234       --  This hash table contains a mapping of project names to project nodes.
1235       --  Note that this hash table contains only the nodes whose Kind is
1236       --  N_Project. It is used to find the node of a project from its name,
1237       --  and to verify if a project has already been parsed, knowing its name.
1238
1239    end Tree_Private_Part;
1240
1241    type Project_Node_Tree_Data is record
1242       Project_Nodes : Tree_Private_Part.Project_Node_Table.Instance;
1243       Projects_HT   : Tree_Private_Part.Projects_Htable.Instance;
1244    end record;
1245    --  The data for a project node tree
1246
1247 private
1248    type Comment_Array is array (Positive range <>) of Comment_Data;
1249    type Comments_Ptr is access Comment_Array;
1250
1251    type Comment_State is record
1252       End_Of_Line_Node   : Project_Node_Id := Empty_Node;
1253
1254       Previous_Line_Node : Project_Node_Id := Empty_Node;
1255
1256       Previous_End_Node  : Project_Node_Id := Empty_Node;
1257
1258       Unkept_Comments    : Boolean := False;
1259
1260       Comments           : Comments_Ptr := null;
1261    end record;
1262
1263 end Prj.Tree;