OSDN Git Service

2010-01-26 Robert Dewar <dewar@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / prj-tree.ads
index ce44910..fa8c132 100644 (file)
@@ -408,7 +408,8 @@ package Prj.Tree is
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
    pragma Inline (First_Declarative_Item_Of);
-   --  Only valid for N_With_Clause nodes
+   --  Only valid for N_Project_Declaration, N_Case_Item and
+   --  N_Package_Declaration.
 
    function Extended_Project_Of
      (Node    : Project_Node_Id;
@@ -492,7 +493,7 @@ package Prj.Tree is
       In_Tree : Project_Node_Tree_Ref) return Name_Id;
    pragma Inline (Associative_Array_Index_Of);
    --  Only valid for N_Attribute_Declaration and N_Attribute_Reference.
-   --  Returns No_String for non associative array attributes.
+   --  Returns No_Name for non associative array attributes.
 
    function Next_Variable
      (Node    : Project_Node_Id;
@@ -573,8 +574,8 @@ package Prj.Tree is
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref) return Project_Node_Id;
    pragma Inline (First_Choice_Of);
-   --  Return the first choice in a N_Case_Item, or Empty_Node if
-   --  this is when others.
+   --  Only valid for N_Case_Item nodes. Return the first choice in a
+   --  N_Case_Item, or Empty_Node if this is when others.
 
    function Next_Case_Item
      (Node    : Project_Node_Id;
@@ -599,38 +600,43 @@ package Prj.Tree is
       Full_Path      : Path_Name_Type;
       Is_Config_File : Boolean := False) return Project_Node_Id;
    --  Create a new node for a project and register it in the tree so that it
-   --  can be retrieved later on
+   --  can be retrieved later on.
 
    function Create_Package
      (Tree    : Project_Node_Tree_Ref;
       Project : Project_Node_Id;
       Pkg     : String) return Project_Node_Id;
    --  Create a new package in Project. If the package already exists, it is
-   --  returned.
-   --  The name of the package *must* be lower-cases, or none of its attributes
-   --  will be recognized.
+   --  returned. The name of the package *must* be lower-cases, or none of its
+   --  attributes will be recognized.
 
    function Create_Attribute
      (Tree       : Project_Node_Tree_Ref;
       Prj_Or_Pkg : Project_Node_Id;
       Name       : Name_Id;
-      Index_Name : Name_Id := No_Name;
-      Kind       : Variable_Kind := List;
-      At_Index   : Integer := 0) return Project_Node_Id;
-   --  Create a new attribute.
-   --  The new declaration is added at the end of the declarative item list for
-   --  Prj_Or_Pkg (a project or a package), but before any package
-   --  declaration). No addition is done if Prj_Or_Pkg is Empty_Node.
-   --  If Index_Name is not "", then if creates an attribute value for a
-   --  specific index.
-   --  At_Index is used for the " at <idx>" in the naming exceptions.
-   --  Use Set_Expression_Of to set the value of the attribute (in which case
-   --  Enclose_In_Expression might be useful)
+      Index_Name : Name_Id         := No_Name;
+      Kind       : Variable_Kind   := List;
+      At_Index   : Integer         := 0;
+      Value      : Project_Node_Id := Empty_Node) return Project_Node_Id;
+   --  Create a new attribute. The new declaration is added at the end of the
+   --  declarative item list for Prj_Or_Pkg (a project or a package), but
+   --  before any package declaration). No addition is done if Prj_Or_Pkg is
+   --  Empty_Node. If Index_Name is not "", then if creates an attribute value
+   --  for a specific index. At_Index is used for the " at <idx>" in the naming
+   --  exceptions.
+   --
+   --  To set the value of the attribute, either provide a value for Value, or
+   --  use Set_Expression_Of to set the value of the attribute (in which case
+   --  Enclose_In_Expression might be useful). The former is recommended since
+   --  it will more correctly handle cases where the index needs to be set on
+   --  the expression rather than on the index of the attribute (i.e. 'for
+   --  Specification ("unit") use "file" at 3', versus 'for Executable ("file"
+   --  at 3) use "name"'). Value must be a N_String_Literal if an index will be
+   --  added to it.
 
    function Create_Literal_String
      (Str  : Namet.Name_Id;
-      Tree : Project_Node_Tree_Ref)
-      return Project_Node_Id;
+      Tree : Project_Node_Tree_Ref) return Project_Node_Id;
    --  Create a literal string whose value is Str
 
    procedure Add_At_End
@@ -639,20 +645,20 @@ package Prj.Tree is
       Expr                  : Project_Node_Id;
       Add_Before_First_Pkg  : Boolean := False;
       Add_Before_First_Case : Boolean := False);
-   --  Add a new declarative item in the list in Parent.
-   --  This new declarative item will contain Expr (unless Expr is already a
-   --  declarative item, in which case it is added directly to the list). The
-   --  new item is inserted at the end of the list, unless Add_Before_First_Pkg
-   --  is True. In the latter case, it is added just before the first case
-   --  construction is seen, or before the first package (this assumes that all
-   --  packages are found at the end of the project, which isn't true in the
-   --  general case unless you have normalized the project to match this
-   --  description).
+   --  Add a new declarative item in the list in Parent. This new declarative
+   --  item will contain Expr (unless Expr is already a declarative item, in
+   --  which case it is added directly to the list). The new item is inserted
+   --  at the end of the list, unless Add_Before_First_Pkg is True. In the
+   --  latter case, it is added just before the first case construction is
+   --  seen, or before the first package (this assumes that all packages are
+   --  found at the end of the project, which isn't true in the general case
+   --  unless you have normalized the project to match this description).
 
    function Enclose_In_Expression
      (Node : Project_Node_Id;
       Tree : Project_Node_Tree_Ref) return Project_Node_Id;
-   --  Enclose the Node inside a N_Expression node, and return this expression
+   --  Enclose the Node inside a N_Expression node, and return this expression.
+   --  This does nothing if Node is already a N_Expression.
 
    --------------------
    -- Set Procedures --
@@ -660,8 +666,12 @@ package Prj.Tree is
 
    --  The following procedures are part of the abstract interface of the
    --  Project File tree.
-   --  Each Set_* procedure is valid only for the same Project_Node_Kind
-   --  nodes as the corresponding query function above.
+
+   --  Foe each Set_* procedure the condition of validity is specified. If an
+   --  access function is called with invalid arguments, then exception
+   --  Assertion_Error is raised if assertions are enabled, otherwise the
+   --  behaviour is not defined and may result in a crash.
+
    --  These are very low-level, and manipulate the tree itself directly. You
    --  should look at the Create_* procedure instead if you want to use higher
    --  level constructs
@@ -671,146 +681,183 @@ package Prj.Tree is
       In_Tree : Project_Node_Tree_Ref;
       To      : Name_Id);
    pragma Inline (Set_Name_Of);
+   --  Valid for all non empty nodes.
 
    procedure Set_Kind_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Kind);
    pragma Inline (Set_Kind_Of);
+   --  Valid for all non empty nodes
 
    procedure Set_Location_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Source_Ptr);
    pragma Inline (Set_Location_Of);
+   --  Valid for all non empty nodes
 
    procedure Set_First_Comment_After
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_First_Comment_After);
+   --  Valid only for N_Comment_Zones nodes
 
    procedure Set_First_Comment_After_End
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_First_Comment_After_End);
+   --  Valid only for N_Comment_Zones nodes
 
    procedure Set_First_Comment_Before
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_First_Comment_Before);
+   --  Valid only for N_Comment_Zones nodes
 
    procedure Set_First_Comment_Before_End
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_First_Comment_Before_End);
+   --  Valid only for N_Comment_Zones nodes
 
    procedure Set_Next_Comment
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Next_Comment);
+   --  Valid only for N_Comment nodes
 
    procedure Set_Parent_Project_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
+   --  Valid only for N_Project nodes
 
    procedure Set_Project_File_Includes_Unkept_Comments
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Boolean);
+   --  Valid only for N_Project nodes
 
    procedure Set_Directory_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Path_Name_Type);
    pragma Inline (Set_Directory_Of);
+   --  Valid only for N_Project nodes
 
    procedure Set_Expression_Kind_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Variable_Kind);
    pragma Inline (Set_Expression_Kind_Of);
+   --  Only valid for N_Literal_String, N_Attribute_Declaration,
+   --  N_Variable_Declaration, N_Typed_Variable_Declaration, N_Expression,
+   --  N_Term, N_Variable_Reference or N_Attribute_Reference nodes.
 
    procedure Set_Is_Extending_All
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref);
    pragma Inline (Set_Is_Extending_All);
+   --  Only valid for N_Project and N_With_Clause
 
    procedure Set_Is_Not_Last_In_List
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref);
    pragma Inline (Set_Is_Not_Last_In_List);
+   --  Only valid for N_With_Clause
 
    procedure Set_First_Variable_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Variable_Node_Id);
    pragma Inline (Set_First_Variable_Of);
+   --  Only valid for N_Project or N_Package_Declaration nodes
 
    procedure Set_First_Package_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Package_Declaration_Id);
    pragma Inline (Set_First_Package_Of);
+   --  Only valid for N_Project nodes
 
    procedure Set_Package_Id_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Package_Node_Id);
    pragma Inline (Set_Package_Id_Of);
+   --  Only valid for N_Package_Declaration nodes
 
    procedure Set_Path_Name_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Path_Name_Type);
    pragma Inline (Set_Path_Name_Of);
+   --  Only valid for N_Project and N_With_Clause nodes
 
    procedure Set_String_Value_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Name_Id);
    pragma Inline (Set_String_Value_Of);
+   --  Only valid for N_With_Clause, N_Literal_String nodes or N_Comment.
+
+   procedure Set_Source_Index_Of
+     (Node    : Project_Node_Id;
+      In_Tree : Project_Node_Tree_Ref;
+      To      : Int);
+   pragma Inline (Set_Source_Index_Of);
+   --  Only valid for N_Literal_String and N_Attribute_Declaration nodes. For
+   --  N_Literal_String, set the source index of the litteral string. For
+   --  N_Attribute_Declaration, set the source index of the index of the
+   --  associative array element.
 
    procedure Set_First_With_Clause_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_First_With_Clause_Of);
+   --  Only valid for N_Project nodes
 
    procedure Set_Project_Declaration_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Project_Declaration_Of);
+   --  Only valid for N_Project nodes
 
    procedure Set_Project_Qualifier_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Qualifier);
    pragma Inline (Set_Project_Qualifier_Of);
+   --  Only valid for N_Project nodes
 
    procedure Set_Extending_Project_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Extending_Project_Of);
+   --  Only valid for N_Project_Declaration nodes
 
    procedure Set_First_String_Type_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_First_String_Type_Of);
+   --  Only valid for N_Project nodes
 
    procedure Set_Extended_Project_Path_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Path_Name_Type);
    pragma Inline (Set_Extended_Project_Path_Of);
+   --  Only valid for N_With_Clause nodes
 
    procedure Set_Project_Node_Of
      (Node         : Project_Node_Id;
@@ -818,185 +865,214 @@ package Prj.Tree is
       To           : Project_Node_Id;
       Limited_With : Boolean := False);
    pragma Inline (Set_Project_Node_Of);
+   --  Only valid for N_With_Clause, N_Variable_Reference and
+   --  N_Attribute_Reference nodes.
 
    procedure Set_Next_With_Clause_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Next_With_Clause_Of);
+   --  Only valid for N_With_Clause nodes
 
    procedure Set_First_Declarative_Item_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_First_Declarative_Item_Of);
+   --  Only valid for N_Project_Declaration, N_Case_Item and
+   --  N_Package_Declaration.
 
    procedure Set_Extended_Project_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Extended_Project_Of);
+   --  Only valid for N_Project_Declaration nodes
 
    procedure Set_Current_Item_Node
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Current_Item_Node);
+   --  Only valid for N_Declarative_Item nodes
 
    procedure Set_Next_Declarative_Item
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Next_Declarative_Item);
+   --  Only valid for N_Declarative_Item node
 
    procedure Set_Project_Of_Renamed_Package_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Project_Of_Renamed_Package_Of);
+   --  Only valid for N_Package_Declaration nodes.
 
    procedure Set_Next_Package_In_Project
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Next_Package_In_Project);
+   --  Only valid for N_Package_Declaration nodes
 
    procedure Set_First_Literal_String
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_First_Literal_String);
+   --  Only valid for N_String_Type_Declaration nodes
 
    procedure Set_Next_String_Type
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Next_String_Type);
+   --  Only valid for N_String_Type_Declaration nodes
 
    procedure Set_Next_Literal_String
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Next_Literal_String);
+   --  Only valid for N_Literal_String nodes
 
    procedure Set_Expression_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Expression_Of);
+   --  Only valid for N_Attribute_Declaration, N_Typed_Variable_Declaration
+   --  or N_Variable_Declaration nodes
 
    procedure Set_Associative_Project_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Associative_Project_Of);
+   --  Only valid for N_Attribute_Declaration nodes
 
    procedure Set_Associative_Package_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Associative_Package_Of);
+   --  Only valid for N_Attribute_Declaration nodes
 
    procedure Set_Associative_Array_Index_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Name_Id);
    pragma Inline (Set_Associative_Array_Index_Of);
+   --  Only valid for N_Attribute_Declaration and N_Attribute_Reference.
 
    procedure Set_Next_Variable
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Next_Variable);
+   --  Only valid for N_Typed_Variable_Declaration or N_Variable_Declaration
+   --  nodes.
 
    procedure Set_First_Term
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_First_Term);
+   --  Only valid for N_Expression nodes
 
    procedure Set_Next_Expression_In_List
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Next_Expression_In_List);
+   --  Only valid for N_Expression nodes
 
    procedure Set_Current_Term
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Current_Term);
+   --  Only valid for N_Term nodes
 
    procedure Set_Next_Term
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Next_Term);
+   --  Only valid for N_Term nodes
 
    procedure Set_First_Expression_In_List
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_First_Expression_In_List);
+   --  Only valid for N_Literal_String_List nodes
 
    procedure Set_Package_Node_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Package_Node_Of);
-
-   procedure Set_Source_Index_Of
-     (Node    : Project_Node_Id;
-      In_Tree : Project_Node_Tree_Ref;
-      To      : Int);
-   pragma Inline (Set_Source_Index_Of);
+   --  Only valid for N_Variable_Reference or N_Attribute_Reference nodes.
 
    procedure Set_String_Type_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_String_Type_Of);
+   --  Only valid for N_Variable_Reference or N_Typed_Variable_Declaration
+   --  nodes.
 
    procedure Set_External_Reference_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_External_Reference_Of);
+   --  Only valid for N_External_Value nodes
 
    procedure Set_External_Default_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_External_Default_Of);
+   --  Only valid for N_External_Value nodes
 
    procedure Set_Case_Variable_Reference_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Case_Variable_Reference_Of);
+   --  Only valid for N_Case_Construction nodes
 
    procedure Set_First_Case_Item_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_First_Case_Item_Of);
+   --  Only valid for N_Case_Construction nodes
 
    procedure Set_First_Choice_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_First_Choice_Of);
+   --  Only valid for N_Case_Item nodes.
 
    procedure Set_Next_Case_Item
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Project_Node_Id);
    pragma Inline (Set_Next_Case_Item);
+   --  Only valid for N_Case_Item nodes.
 
    procedure Set_Case_Insensitive
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
       To      : Boolean);
+   --  Only valid for N_Attribute_Declaration and N_Attribute_Reference nodes
 
    -------------------------------
    -- Restricted Access Section --
@@ -1004,9 +1080,8 @@ package Prj.Tree is
 
    package Tree_Private_Part is
 
-      --  This is conceptually in the private part
-
-      --  However, for efficiency, some packages are accessing it directly
+      --  This is conceptually in the private part. However, for efficiency,
+      --  some packages are accessing it directly.
 
       type Project_Node_Record is record
 
@@ -1336,6 +1411,9 @@ package Prj.Tree is
          Name : Name_Id;
          --  Name of the project
 
+         Display_Name : Name_Id;
+         --  The name of the project as it appears in the .gpr file
+
          Node : Project_Node_Id;
          --  Node of the project in table Project_Nodes
 
@@ -1352,6 +1430,7 @@ package Prj.Tree is
 
       No_Project_Name_And_Node : constant Project_Name_And_Node :=
         (Name           => No_Name,
+         Display_Name   => No_Name,
          Node           => Empty_Node,
          Canonical_Path => No_Path,
          Extended       => True,
@@ -1371,13 +1450,39 @@ package Prj.Tree is
 
    end Tree_Private_Part;
 
+   package Name_To_Name_HTable is new GNAT.Dynamic_HTables.Simple_HTable
+     (Header_Num => Header_Num,
+      Element    => Name_Id,
+      No_Element => No_Name,
+      Key        => Name_Id,
+      Hash       => Hash,
+      Equal      => "=");
+   --  General type for htables associating name_id to name_id. This is in
+   --  particular used to store the values of external references.
+
    type Project_Node_Tree_Data is record
       Project_Nodes : Tree_Private_Part.Project_Node_Table.Instance;
       Projects_HT   : Tree_Private_Part.Projects_Htable.Instance;
+
+      External_References : Name_To_Name_HTable.Instance;
+      --  External references are stored in this hash table (and manipulated
+      --  through subprogrames in prj-ext.ads). External references are
+      --  project-tree specific so that one can load the same tree twice but
+      --  have two views of it, for instance.
+
+      Project_Path : String_Access;
+      --  The project path, manipulated through subprograms in prj-ext.ads.
+      --  As a special case, if the first character is '#:" or this variable is
+      --  unset, this means that the PATH has not been fully initialized yet
+      --  (although subprograms prj-ext.ads will properly take care of that).
+      --
+      --  The project path is tree specific, since we might want to load
+      --  simultaneously multiple projects, each with its own search path, in
+      --  particular when using different compilers with different default
+      --  search directories.
    end record;
-   --  The data for a project node tree
 
-   procedure Free (Prj : in out Project_Node_Tree_Ref);
+   procedure Free (Proj : in out Project_Node_Tree_Ref);
    --  Free memory used by Prj
 
 private