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