summaryrefslogtreecommitdiffstats
path: root/gcc/ada/prj-tree.adb
diff options
context:
space:
mode:
authorbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-11 01:02:03 +0000
committerbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-11 01:02:03 +0000
commit42f613d54031a7d0859959cee3a8b311ec444d74 (patch)
treea7dd7bd90b833295e4cdd24ca2443617ba4bd34c /gcc/ada/prj-tree.adb
parentd775516a4f89655206d1b5b9d64cee6fbe979080 (diff)
downloadppe42-gcc-42f613d54031a7d0859959cee3a8b311ec444d74.tar.gz
ppe42-gcc-42f613d54031a7d0859959cee3a8b311ec444d74.zip
* make.adb:
(Add_Switches): reflect the changes for the switches attributes Default_Switches indexed by the programming language, Switches indexed by the file name. (Collect_Arguments_And_Compile): Idem. Reflect the attribute name changes. * prj-attr.adb: (Initialisation_Data): Change the names of some packages and attributes. (Initialize): process case insensitive associative arrays. * prj-attr.ads: (Attribute_Kind): Remove Both, add Case_Insensitive_Associative_Array. * prj-dect.adb: (Parse_Attribute_Declaration): For case insensitive associative arrays, set the index string to lower case. * prj-env.adb: Reflect the changes of the project attributes. * prj-nmsc.adb: Replace Check_Naming_Scheme by Ada_Check and Language_Independent_Check. * prj-nmsc.ads: Replaced Check_Naming_Scheme by 2 procedures: Ada_Check and Language_Independent_Check. * prj-proc.adb: (Process_Declarative_Items): For case-insensitive associative arrays, set the index string to lower case. (Recursive_Check): Call Prj.Nmsc.Ada_Check, instead of Prj.Nmsc.Check_Naming_Scheme. * prj-tree.adb: (Case_Insensitive): New function (Set_Case_Insensitive): New procedure * prj-tree.ads: (Case_Insensitive): New function (Set_Case_Insensitive): New procedure (Project_Node_Record): New flag Case_Insensitive. * prj-util.adb: (Value_Of): new function to get the string value of a single string variable or attribute. * prj-util.ads: (Value_Of): new function to get the string value of a single string variable or attribute. * prj.adb: (Ada_Default_Spec_Suffix): New function (Ada_Default_Impl_Suffix): New function Change definitions of several constants to reflect new components of record types. * prj.ads: (Naming_Data): Change several components to reflect new elements of naming schemes. (Project_Data): New flags Sources_Present and Language_Independent_Checked. (Ada_Default_Spec_Suffix): New function. (Ada_Default_Impl_Suffix): New function. * snames.ads: Modification of predefined names for project manager: added Implementation, Specification_Exceptions, Implementation_Exceptions, Specification_Suffix, Implementation_Suffix, Separate_Suffix, Default_Switches, _Languages, Builder, Cross_Reference, Finder. Removed Body_Part, Specification_Append, Body_Append, Separate_Append, Gnatmake, Gnatxref, Gnatfind, Gnatbind, Gnatlink. * prj.ads: (Ada_Default_Spec_Suffix, Ada_Default_Impl_Suffix): Add comments. * prj-nmsc.adb (Ada_Check): Test that Separate_Suffix is defaulted, not that it is Nil_Variable_Value. * prj.ads: Add ??? for uncommented declarations git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46169 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-tree.adb')
-rw-r--r--gcc/ada/prj-tree.adb58
1 files changed, 44 insertions, 14 deletions
diff --git a/gcc/ada/prj-tree.adb b/gcc/ada/prj-tree.adb
index 322e4aae39f..9f0df4851fd 100644
--- a/gcc/ada/prj-tree.adb
+++ b/gcc/ada/prj-tree.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.7 $
+-- $Revision$
-- --
-- Copyright (C) 2001 Free Software Foundation, Inc. --
-- --
@@ -48,6 +48,19 @@ package body Prj.Tree is
return Project_Nodes.Table (Node).Value;
end Associative_Array_Index_Of;
+ ----------------------
+ -- Case_Insensitive --
+ ----------------------
+
+ function Case_Insensitive (Node : Project_Node_Id) return Boolean is
+ begin
+ pragma Assert
+ (Node /= Empty_Node
+ and then
+ (Project_Nodes.Table (Node).Kind = N_Attribute_Declaration));
+ return Project_Nodes.Table (Node).Case_Insensitive;
+ end Case_Insensitive;
+
--------------------------------
-- Case_Variable_Reference_Of --
--------------------------------
@@ -108,19 +121,20 @@ package body Prj.Tree is
begin
Project_Nodes.Increment_Last;
Project_Nodes.Table (Project_Nodes.Last) :=
- (Kind => Of_Kind,
- Location => No_Location,
- Directory => No_Name,
- Expr_Kind => And_Expr_Kind,
- Variables => Empty_Node,
- Packages => Empty_Node,
- Pkg_Id => Empty_Package,
- Name => No_Name,
- Path_Name => No_Name,
- Value => No_String,
- Field1 => Empty_Node,
- Field2 => Empty_Node,
- Field3 => Empty_Node);
+ (Kind => Of_Kind,
+ Location => No_Location,
+ Directory => No_Name,
+ Expr_Kind => And_Expr_Kind,
+ Variables => Empty_Node,
+ Packages => Empty_Node,
+ Pkg_Id => Empty_Package,
+ Name => No_Name,
+ Path_Name => No_Name,
+ Value => No_String,
+ Field1 => Empty_Node,
+ Field2 => Empty_Node,
+ Field3 => Empty_Node,
+ Case_Insensitive => False);
return Project_Nodes.Last;
end Default_Project_Node;
@@ -723,6 +737,22 @@ package body Prj.Tree is
Project_Nodes.Table (Node).Value := To;
end Set_Associative_Array_Index_Of;
+ --------------------------
+ -- Set_Case_Insensitive --
+ --------------------------
+
+ procedure Set_Case_Insensitive
+ (Node : Project_Node_Id;
+ To : Boolean)
+ is
+ begin
+ pragma Assert
+ (Node /= Empty_Node
+ and then
+ Project_Nodes.Table (Node).Kind = N_Attribute_Declaration);
+ Project_Nodes.Table (Node).Case_Insensitive := To;
+ end Set_Case_Insensitive;
+
------------------------------------
-- Set_Case_Variable_Reference_Of --
------------------------------------
OpenPOWER on IntegriCloud