Commit 6db4c5bc authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Minor code cleanup

parent 2d5f7ec6
......@@ -46,12 +46,12 @@ procedure AADL_Parser is
Deployment_root : Node_Id := No_Node;
Dataview_root : Node_ID := No_Node;
Success : Boolean;
-- OutDir : Integer := 0;
-- Stack_Val : Integer := 0;
-- Timer_Resolution : Integer := 0;
Interface_View : Integer := 0;
Depl_View_Pos : Integer := 0;
Data_View : Integer := 0;
-- OutDir : Natural := 0;
-- Stack_Val : Natural := 0;
-- Timer_Resolution : Natural := 0;
Interface_View : Natural := 0;
Depl_View_Pos : Natural := 0;
Data_View : Natural := 0;
Generate_glue : Boolean := false;
AADL_Version : AADL_Version_Type := Ocarina.AADL_V2;
......
......@@ -6,6 +6,7 @@
with Ada.Text_IO,
Ada.Exceptions,
Ada.Strings.Fixed,
System.Assertions,
-- Ada.Command_Line,
Ocarina.Instances.Queries,
......@@ -26,6 +27,7 @@ package body Deployment_View is
use Ada.Text_IO,
Ada.Exceptions,
Ada.Strings.Fixed,
System.Assertions,
Ocarina.Instances.Queries,
Ocarina.Namet,
......@@ -97,7 +99,7 @@ package body Deployment_View is
function Parse_Bus (Elem : Node_Id; Bus : Node_Id) return Taste_Bus is
Properties : constant Property_Maps.Map := Get_Properties_Map (CI);
Classifier : Name_Id := No_Name;
Classifier : Name_Id;
Pkg_Name : Name_Id := No_Name;
begin
Set_Str_To_Name_Buffer ("");
......@@ -116,6 +118,7 @@ package body Deployment_View is
Classifier := Name_Find;
else
Classifier := Name (Identifier (Bus));
-- No "default" Pkg_Name?
end if;
return Taste_Bus'(Name =>
US (Get_Name_String (Name (Identifier (Elem)))),
......@@ -212,11 +215,11 @@ package body Deployment_View is
function Parse_Device (CI : Node_Id) return Taste_Device_Driver is
Result : Taste_Device_Driver;
Pkg_Name : Name_Id := No_Name;
Accessed_Bus : Node_Id := No_Node;
Accessed_Port : Node_Id := No_Node;
Device_Implementation : Node_Id := No_Node;
Configuration_Data : Node_Id := No_Node;
Pkg_Name : Name_Id;
Accessed_Bus : Node_Id;
Accessed_Port : Node_Id;
Device_Implementation : Node_Id;
Configuration_Data : Node_Id;
begin
Result.Name := US (Get_Name_String (Name (Identifier (CI))));
......@@ -246,10 +249,11 @@ package body Deployment_View is
end if;
for Index in ST'Range loop
Get_Name_String (ST (Index));
if Name_Buffer (Name_Len - 3 .. Name_Len) = ".asn"
if Tail (Source => Name_Buffer (1 .. Name_Len),
Count => 4) = ".asn"
then
Result.ASN1_Filename := US (Get_Name_String
(Get_String_Name (Name_Buffer (1 .. Name_Len))));
Result.ASN1_Filename :=
US (Name_Buffer (1 .. Name_Len));
end if;
end loop;
end;
......
......@@ -126,7 +126,7 @@ package body Interface_View is
---------------------------
function Get_ASN1_Module_Name (D : Node_Id) return String is
id : Name_Id := No_Name;
id : Name_Id;
ASN1_Module : constant Name_id :=
Get_String_Name ("deployment::asn1_module_name");
begin
......@@ -494,7 +494,7 @@ package body Interface_View is
Result : Taste_Terminal_Function;
-- 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;
Zip_Id : Name_Id;
-- To get the context parameters
Subco : Node_Id;
-- To get the provided and required interfaces
......
package Parser_Version is
Parser_Release : constant String :=
"a3aa44d ; Commit Date: Tue Dec 5 21:56:09 2017 ";
"2d5f7ec ; Commit Date: Wed Dec 6 18:21:43 2017 ";
Ocarina_Version : constant String :=
"Ocarina 2017.x (Working Copy from r0b92ed3)";
end Parser_Version;
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment