Commit 70ac21f6 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Dump data view too

parent cc53cbe0
......@@ -212,7 +212,7 @@ package body TASTE.AADL_Parser is
Mode => Out_File,
Name => Output_Path & "/DataView.dump");
Put_Info ("Dump of the Data View");
Model.Data_View.Debug_Dump;
Model.Data_View.Debug_Dump (Output);
Close (Output);
Create (File => Output,
Mode => Out_File,
......
-- *************************** taste aadl parser *********************** --
-- (c) 2017 European Space Agency - maxime.perrotin@esa.int
-- (c) 2018 European Space Agency - maxime.perrotin@esa.int
-- LGPL license, see LICENSE file
-- Interface View parser
with Ada.Text_IO,
Locations,
with Locations,
Ocarina.Instances.Queries,
Ocarina.Analyzer,
Ocarina.Backends.Properties,
......@@ -20,8 +19,7 @@ with Ada.Text_IO,
package body TASTE.Data_View is
use Ada.Text_IO,
Locations,
use Locations,
Ocarina.Instances.Queries,
Ocarina.Namet,
Ocarina.Analyzer,
......@@ -104,12 +102,12 @@ package body TASTE.Data_View is
return Data_AST : constant Taste_Data_View := (ASN1_Files => Files);
end Parse_Data_View;
procedure Debug_Dump (DV : Taste_Data_View) is
procedure Debug_Dump (DV : Taste_Data_View; Output : File_Type) is
begin
for Each of DV.ASN1_Files loop
Put_Line ("Name : " & To_String (Each.Path));
Put_Line (Output, To_String (Each.Path));
for Module of Each.Modules loop
Put_Line (" |_Module : " & Module);
Put_Line (Output, " |_Module : " & Module);
end loop;
end loop;
end Debug_Dump;
......
......@@ -4,16 +4,18 @@
-- Data View parser
with Ocarina,
Ocarina.Types,
with Text_IO,
Ada.Containers.Indefinite_Ordered_Maps,
Ada.Strings.Unbounded,
Ocarina,
Ocarina.Types,
TASTE.Parser_Utils;
use Ocarina,
Ocarina.Types,
use Text_IO,
Ada.Containers,
Ada.Strings.Unbounded,
Ocarina,
Ocarina.Types,
TASTE.Parser_Utils;
package TASTE.Data_View is
......@@ -49,6 +51,6 @@ package TASTE.Data_View is
function Parse_Data_View (Dataview_Root : Node_Id) return Taste_Data_View
with Pre => Dataview_Root /= No_Node;
procedure Debug_Dump (DV : Taste_Data_View);
procedure Debug_Dump (DV : Taste_Data_View; Output : File_Type);
end TASTE.Data_View;
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