This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Change "Modifying" to "Extends" in projects facility


"Modifying" was confusing in this context.

2001-12-05  Vincent Celier <celier@gnat.com>

	* prj-dect.adb (Parse): Rename parameter Modifying to Extends.
	
	* prj-dect.ads (Parse): Rename parameter Modifying to Extends.
	
	* prj-env.adb: Minor comment changes (modifying -> extends).
	
	* prj-nmsc.adb: Minor comment changes (modifying -> extends).
	
	* prj-part.adb (Parse_Single_Project): Change Tok_Modifying to 
	Tok_Extends.
	
	* prj.adb (Initialize): Change Modifying to Extends.
	
	* scans.ads (Token_Type): Change Tok_Modifying to Tok_Extends.
	
	* prj.ads: Minor comment change (Modifying -> extending).
	
	* snames.ads: Change modifying to extends.

*** prj-dect.adb	2001/10/05 15:15:30	1.6
--- prj-dect.adb	2001/10/20 04:14:13	1.7
***************
*** 88,101 ****
     procedure Parse
       (Declarations    : out Project_Node_Id;
        Current_Project : Project_Node_Id;
!       Modifying       : Project_Node_Id)
     is
        First_Declarative_Item : Project_Node_Id := Empty_Node;
  
     begin
        Declarations := Default_Project_Node (Of_Kind => N_Project_Declaration);
        Set_Location_Of (Declarations, To => Token_Ptr);
!       Set_Modified_Project_Of (Declarations, To => Modifying);
        Parse_Declarative_Items
          (Declarations    => First_Declarative_Item,
           In_Zone         => In_Project,
--- 88,101 ----
     procedure Parse
       (Declarations    : out Project_Node_Id;
        Current_Project : Project_Node_Id;
!       Extends         : Project_Node_Id)
     is
        First_Declarative_Item : Project_Node_Id := Empty_Node;
  
     begin
        Declarations := Default_Project_Node (Of_Kind => N_Project_Declaration);
        Set_Location_Of (Declarations, To => Token_Ptr);
!       Set_Modified_Project_Of (Declarations, To => Extends);
        Parse_Declarative_Items
          (Declarations    => First_Declarative_Item,
           In_Zone         => In_Project,
***************
*** 177,183 ****
        else
           if Current_Attribute /= Empty_Attribute
             and then
!              Attributes.Table (Current_Attribute).Kind_2 = Associative_Array
           then
              Error_Msg ("this attribute need to be an associative array",
                         Location_Of (Attribute));
--- 177,183 ----
        else
           if Current_Attribute /= Empty_Attribute
             and then
!              Attributes.Table (Current_Attribute).Kind_2 /= Single
           then
              Error_Msg ("this attribute need to be an associative array",
                         Location_Of (Attribute));

*** prj-dect.ads	2001/05/03 05:02:25	1.2
--- prj-dect.ads	2001/10/20 04:14:14	1.3
***************
*** 35,41 ****
     procedure Parse
       (Declarations    : out Prj.Tree.Project_Node_Id;
        Current_Project : Prj.Tree.Project_Node_Id;
!       Modifying       : Prj.Tree.Project_Node_Id);
     --  Parse project declarative items.
  
  end Prj.Dect;
--- 35,41 ----
     procedure Parse
       (Declarations    : out Prj.Tree.Project_Node_Id;
        Current_Project : Prj.Tree.Project_Node_Id;
!       Extends         : Prj.Tree.Project_Node_Id);
     --  Parse project declarative items.
  
  end Prj.Dect;

*** prj-env.adb	2001/10/05 15:15:34	1.18
--- prj-env.adb	2001/10/20 04:14:16	1.19
***************
*** 1023,1029 ****
              Action (Name_Buffer (1 .. Name_Len));
           end if;
  
!          --  If we are modifying a project, visit it
  
           if Data.Modifies /= No_Project then
              Add (Data.Modifies);
--- 1023,1029 ----
              Action (Name_Buffer (1 .. Name_Len));
           end if;
  
!          --  If we are extending a project, visit it
  
           if Data.Modifies /= No_Project then
              Add (Data.Modifies);
***************
*** 1120,1126 ****
              end loop;
           end;
  
!          --  If we are modifying a project, visit it
  
           if Data.Modifies /= No_Project then
              Add (Data.Modifies);
--- 1120,1126 ----
              end loop;
           end;
  
!          --  If we are extending a project, visit it
  
           if Data.Modifies /= No_Project then
              Add (Data.Modifies);

*** prj-nmsc.adb	2001/10/06 13:38:57	1.28
--- prj-nmsc.adb	2001/10/20 04:14:18	1.29
***************
*** 249,256 ****
  
                                --  We attempt to register it as a source.
                                --  However, there is no error if the file
!                               --  does not contain a valid source (as
!                               --  indicated by Error_If_Invalid => False).
                                --  But there is an error if we have a
                                --  duplicate unit name.
  
--- 249,255 ----
  
                                --  We attempt to register it as a source.
                                --  However, there is no error if the file
!                               --  does not contain a valid source.
                                --  But there is an error if we have a
                                --  duplicate unit name.
  
***************
*** 2224,2232 ****
           Unit_Kind    => Unit_Kind,
           Needs_Pragma => Needs_Pragma);
  
-       --  If it is not a source file, report an error only if
-       --  Error_If_Invalid is true.
- 
        if Unit_Name = No_Name then
           if Current_Verbosity = High then
              Write_Str  ("   """);
--- 2223,2228 ----
***************
*** 2271,2277 ****
  
              --  The unit is already in the list, but may be it is
              --  only the other unit kind (spec or body), or what is
!             --  in the unit list is a unit of a project we are modifying.
  
              if The_Unit /= Prj.Com.No_Unit then
                 The_Unit_Data := Units.Table (The_Unit);
--- 2267,2273 ----
  
              --  The unit is already in the list, but may be it is
              --  only the other unit kind (spec or body), or what is
!             --  in the unit list is a unit of a project we are extending.
  
              if The_Unit /= Prj.Com.No_Unit then
                 The_Unit_Data := Units.Table (The_Unit);

*** prj-part.adb	2001/08/19 20:43:20	1.10
--- prj-part.adb	2001/10/20 04:14:21	1.11
***************
*** 535,545 ****
  
        end if;
  
!       if Token = Tok_Modifying then
  
!          --  We are modifying another project
  
!          --  Scan past "modifying"
  
           Scan;
  
--- 535,545 ----
  
        end if;
  
!       if Token = Tok_Extends then
  
!          --  We are extending another project
  
!          --  Scan past "extends"
  
           Scan;
  
***************
*** 595,601 ****
           Prj.Dect.Parse
             (Declarations    => Project_Declaration,
              Current_Project => Project,
!             Modifying       => Modified_Project);
           Set_Project_Declaration_Of (Project, Project_Declaration);
        end;
  
--- 595,601 ----
           Prj.Dect.Parse
             (Declarations    => Project_Declaration,
              Current_Project => Project,
!             Extends         => Modified_Project);
           Set_Project_Declaration_Of (Project, Project_Declaration);
        end;
  

*** prj.adb	2001/10/05 15:16:17	1.17
--- prj.adb	2001/10/20 04:14:25	1.18
***************
*** 225,233 ****
           Std_Naming_Data.Separate_Suffix     := Default_Ada_Impl_Suffix;
           Prj.Env.Initialize;
           Prj.Attr.Initialize;
!          Set_Name_Table_Byte (Name_Project,   Token_Type'Pos (Tok_Project));
!          Set_Name_Table_Byte (Name_Modifying, Token_Type'Pos (Tok_Modifying));
!          Set_Name_Table_Byte (Name_External,  Token_Type'Pos (Tok_External));
        end if;
     end Initialize;
  
--- 225,233 ----
           Std_Naming_Data.Separate_Suffix     := Default_Ada_Impl_Suffix;
           Prj.Env.Initialize;
           Prj.Attr.Initialize;
!          Set_Name_Table_Byte (Name_Project,  Token_Type'Pos (Tok_Project));
!          Set_Name_Table_Byte (Name_Extends,  Token_Type'Pos (Tok_Extends));
!          Set_Name_Table_Byte (Name_External, Token_Type'Pos (Tok_External));
        end if;
     end Initialize;
  

*** scans.ads	2001/09/29 03:26:15	1.34
--- scans.ads	2001/10/20 04:14:29	1.35
***************
*** 191,197 ****
        --  project files.
  
        Tok_Project,
!       Tok_Modifying,
        Tok_External,
  
        No_Token);
--- 191,197 ----
        --  project files.
  
        Tok_Project,
!       Tok_Extends,
        Tok_External,
  
        No_Token);

*** prj.ads	2001/10/05 16:50:06	1.21
--- prj.ads	2001/10/20 04:14:27	1.22
***************
*** 296,302 ****
     type Project_Data is record
        First_Referred_By  : Project_Id     := No_Project;
        --  The project, if any, that was the first to be known
!       --  as importing or modifying this project.
        --  Set by Prj.Proc.Process.
  
        Name               : Name_Id        := No_Name;
--- 296,302 ----
     type Project_Data is record
        First_Referred_By  : Project_Id     := No_Project;
        --  The project, if any, that was the first to be known
!       --  as importing or extending this project.
        --  Set by Prj.Proc.Process.
  
        Name               : Name_Id        := No_Name;

*** snames.ads	2001/10/05 15:18:26	1.211
--- snames.ads	2001/10/20 04:14:34	1.212
***************
*** 861,867 ****
     --  Reserved words of GNAT Project Files
  
     Name_Project                        : constant Name_Id := N + 523;
!    Name_Modifying                      : constant Name_Id := N + 524;
     --  Name_External is already declared as N + 161
  
     --  Names used in GNAT Project Files
--- 861,867 ----
     --  Reserved words of GNAT Project Files
  
     Name_Project                        : constant Name_Id := N + 523;
!    Name_Extends                        : constant Name_Id := N + 524;
     --  Name_External is already declared as N + 161
  
     --  Names used in GNAT Project Files


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]