diff --git a/ada/buildsupport.adb b/ada/buildsupport.adb index eef8e3b5921d2f43cd8f74fdbd87ed8fa7953aba..7396b588cc6efc09a81455337456bbe8291d959b 100644 --- a/ada/buildsupport.adb +++ b/ada/buildsupport.adb @@ -269,8 +269,6 @@ procedure BuildSupport is NA : constant Name_Array := Get_Source_Text (Asn1type); FS_File : Unbounded_String; - -- For the Ada AST: - CP : Context_Parameter; begin -- Some special DATA components have no -- Source_Text property in DataView.aadl @@ -288,12 +286,6 @@ procedure BuildSupport is To_String (FS_file), To_String (FS_file)'Length, FS_Fullname); - CP := (Name => US (FS_Fullname), - Sort => US (FS_type), - Default_Value => US (FS_value), - ASN1_Module => US (FS_module), - ASN1_File_Name => FS_file); - pragma Unreferenced (CP); end; end if; FV_Subco := Next_Node (FV_Subco); diff --git a/ada/buildsupport_utils.adb b/ada/buildsupport_utils.adb index 7af34b852efe21c9f7f9cf03f400f8de55a74588..0962e1fcffadfd383e2486a5960f1bc106103886 100644 --- a/ada/buildsupport_utils.adb +++ b/ada/buildsupport_utils.adb @@ -400,6 +400,8 @@ package body Buildsupport_Utils is -- To get the optional zip filename where user code is stored: Source_Text : constant Name_Array := Get_Source_Text (Inst); Zip_Id : Name_Id := No_Name; + -- To get the context parameters + Subco : Node_Id; begin Result.Name := US (Name); Result.Language := Get_Source_Language (Inst); @@ -407,6 +409,20 @@ package body Buildsupport_Utils is Zip_Id := Source_Text (1); Result.Zip_File := Just (US (Get_Name_String (Zip_Id))); end if; + -- Parse context parameters + if Present (AIN.Subcomponents (Inst)) then + Subco := AIN.First_Node (AIN.Subcomponents (Inst)); + while Present (Subco) loop + case Get_Category_Of_Component (Subco) is + when CC_Data => + null; + when others => + null; + end case; + + Subco := AIN.Next_Node (Subco); + end loop; + end if; return Result; end Parse_Function; diff --git a/ada/buildsupport_utils.ads b/ada/buildsupport_utils.ads index c1c5f2b6d504ae673f332690cc34c5918f640f49..1df7bb1bb441829c2a094c1827bd7529be5979ac 100644 --- a/ada/buildsupport_utils.ads +++ b/ada/buildsupport_utils.ads @@ -105,6 +105,9 @@ package Buildsupport_Utils is -- Types needed to build the AST of the TASTE Interface View in Ada type Parameter_Direction is (param_in, param_out); + package Option_UString is new Option_Type (Unbounded_String); + use Option_UString; + type ASN1_Parameter is record Name : Unbounded_String; @@ -139,18 +142,16 @@ package Buildsupport_Utils is Sort : Unbounded_String; Default_Value : Unbounded_String; ASN1_Module : Unbounded_String; - ASN1_File_Name : Unbounded_String; + ASN1_File_Name : Option (Present => False); end record; package Ctxt_Params is new Indefinite_Vectors (Natural, Context_Parameter); - package Option_Zip is new Option_Type (Unbounded_String); - use Option_Zip; type Taste_Terminal_Function is record Name : Unbounded_String; Language : Supported_Source_Language; - Zip_File : Option_Zip.Option (False) := Nothing; + Zip_File : Option (Present => False); Context_Params : Ctxt_Params.Vector; User_Properties : Property_Maps.Map; Timers : String_Vectors.Vector;