Commit 37cfee52 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Move concurrency view generator to parser level

parent 85296fb3
...@@ -11,7 +11,7 @@ begin ...@@ -11,7 +11,7 @@ begin
Model : constant TASTE_Model := Parse_Project; Model : constant TASTE_Model := Parse_Project;
Transformed : TASTE_Model := Transform (Model); Transformed : TASTE_Model := Transform (Model);
begin begin
Create_Concurrency_View (Transformed); Transformed.Add_Concurrency_View;
Transformed.Dump; Transformed.Dump;
Transformed.Generate_Build_Script; Transformed.Generate_Build_Script;
Transformed.Generate_Code; Transformed.Generate_Code;
......
...@@ -243,6 +243,12 @@ package body TASTE.AADL_Parser is ...@@ -243,6 +243,12 @@ package body TASTE.AADL_Parser is
return Nothing; return Nothing;
end Find_Binding; end Find_Binding;
procedure Add_Concurrency_View (Model : in out TASTE_Model) is
Result : Taste_Concurrency_View;
begin
Model.Concurrency_View := Result;
end Add_Concurrency_View;
procedure Dump (Model : TASTE_Model) is procedure Dump (Model : TASTE_Model) is
Output_Path : constant String := Model.Configuration.Output_Dir.all Output_Path : constant String := Model.Configuration.Output_Dir.all
& "/Debug"; & "/Debug";
......
...@@ -35,6 +35,8 @@ package TASTE.AADL_Parser is ...@@ -35,6 +35,8 @@ package TASTE.AADL_Parser is
function Parse_Project return TASTE_Model; function Parse_Project return TASTE_Model;
procedure Add_Concurrency_View (Model : in out TASTE_Model);
function Find_Binding (Model : TASTE_Model; function Find_Binding (Model : TASTE_Model;
F : Unbounded_String) F : Unbounded_String)
return Option_Partition.Option; return Option_Partition.Option;
......
with Ada.Containers, with Ada.Containers,
-- Ocarina.Backends.Properties, -- Ocarina.Backends.Properties,
TASTE.Parser_Utils, TASTE.Parser_Utils;
TASTE.Concurrency_View;
use Ada.Containers, use Ada.Containers,
-- Ocarina.Backends.Properties, -- Ocarina.Backends.Properties,
TASTE.Parser_Utils, TASTE.Parser_Utils;
TASTE.Concurrency_View;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
-- with Text_IO; use Text_IO; -- with Text_IO; use Text_IO;
...@@ -203,11 +201,4 @@ package body TASTE.Model_Transformations is ...@@ -203,11 +201,4 @@ package body TASTE.Model_Transformations is
return Result; return Result;
end Transform; end Transform;
procedure Create_Concurrency_View (Model : in out TASTE_Model) is
Result : Taste_Concurrency_View;
begin
Model.Concurrency_View := Result;
end Create_Concurrency_View;
end TASTE.Model_Transformations; end TASTE.Model_Transformations;
...@@ -16,8 +16,6 @@ package TASTE.Model_Transformations is ...@@ -16,8 +16,6 @@ package TASTE.Model_Transformations is
-- * Create Timer manager functions -- * Create Timer manager functions
function Transform (Model : TASTE_Model) return TASTE_Model; function Transform (Model : TASTE_Model) return TASTE_Model;
procedure Create_Concurrency_View (Model : in out TASTE_Model);
Transformation_Error : exception; Transformation_Error : exception;
private private
......
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