Commit 6467a515 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Fix use of 'Indent tag

parent 08f5fd45
......@@ -4,12 +4,15 @@
with Ada.Directories,
Ada.IO_Exceptions,
Ada.Exceptions;
Ada.Exceptions,
Ada.Characters.Latin_1;
use Ada.Directories;
package body TASTE.Concurrency_View is
Newline : Character renames Ada.Characters.Latin_1.LF;
procedure Debug_Dump (CV : Taste_Concurrency_View; Output : File_Type) is
procedure Dump_Partition (Partition : CV_Partition) is
begin
......@@ -188,8 +191,8 @@ package body TASTE.Concurrency_View is
is
Partition : constant CV_Partition :=
CV.Nodes (Node_Name).Partitions (Partition_Name);
Threads : Tag;
Blocks : Tag;
Threads : Unbounded_String;
Blocks : Unbounded_String;
Partition_Assoc : Translate_Set;
begin
for T of Partition.Threads loop
......@@ -199,29 +202,29 @@ package body TASTE.Concurrency_View is
Result : constant String :=
(Parse (Path & "/thread.tmplt", Thread_Assoc));
begin
Threads := Threads & Result;
Threads := Threads & Newline & Result;
end;
end loop;
for B of Partition.Blocks loop
declare
Tmpl : constant Block_As_Template := B.Prepare_Template;
Block_Assoc : Translate_Set := Tmpl.Header;
PI_Tag : Tag;
RI_Tag : Tag;
PI_Tag : Unbounded_String;
RI_Tag : Unbounded_String;
begin
for PI_Assoc of Tmpl.Provided loop
PI_Tag := PI_Tag
PI_Tag := PI_Tag & Newline
& String'(Parse (Path & "/pi.tmplt", PI_Assoc));
end loop;
for RI_Assoc of Tmpl.Required loop
RI_Tag := RI_Tag
RI_Tag := RI_Tag & Newline
& String'(Parse (Path & "/ri.tmplt", RI_Assoc));
end loop;
Block_Assoc := Block_Assoc
& Assoc ("Provided", PI_Tag)
& Assoc ("Required", RI_Tag);
Blocks := Blocks &
Blocks := Blocks & Newline &
String'(Parse (Path & "/block.tmplt", Block_Assoc));
end;
end loop;
......@@ -234,7 +237,7 @@ package body TASTE.Concurrency_View is
return Parse (Path & "/partition.tmplt", Partition_Assoc);
end Generate_Partition;
Partitions : Tag;
Partitions : Unbounded_String;
Node_Assoc : Translate_Set;
begin
......
......@@ -25,16 +25,17 @@ package TASTE.Data_View is
Data_View_Error : exception;
-- Extra files needed to parse the Data view (dependency hell)
Data_View_AADL_Lib : String_Vectors.Vector := Empty_Vector &
"aadl_project.aadl" &
"taste_properties.aadl" &
"communication_properties.aadl" &
"timing_properties.aadl" &
"programming_properties.aadl" &
"memory_properties.aadl" &
"base_types.aadl" &
"data_model.aadl" &
"deployment.aadl";
Data_View_AADL_Lib : String_Vectors.Vector :=
Empty_Vector
& "aadl_project.aadl"
& "taste_properties.aadl"
& "communication_properties.aadl"
& "timing_properties.aadl"
& "programming_properties.aadl"
& "memory_properties.aadl"
& "base_types.aadl"
& "data_model.aadl"
& "deployment.aadl";
type ASN1_Module is
record
......
......@@ -8,11 +8,8 @@
protected @_CAPITALIZE:Name_@ is -- part of node "@_CAPITALIZE:Node_Name_@"
-- Calling Threads: @_Calling_Threads_@
@@TABLE@@
@_Provided'INDENT_@
@@END_TABLE@@
@_Provided'Indent_@
@_Required'Indent_@
@@TABLE@@
@_Required'INDENT_@
@@END_TABLE@@
end @_CAPITALIZE:Name_@;
......@@ -4,9 +4,8 @@
@@-- @_Partitions_@ : List of rendered code for partitions
@@-- In standard TASTE systems there is only one partition per node
package body @_CAPITALIZE:Node_Name_@ is
@_Partitions_@
@@TABLE@@
@_Partitions'Indent_@
@@END_TABLE@@
end @_CAPITALIZE:Node_Name_@;
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : Partition name (usually the name of the binary)
@@-- @_Threads_@ : List of threads
@@-- @_Blocks_@ : List of protected functions
@@-- @_Threads_@ : Code generated for the threads
@@-- @_Blocks_@ : Code generated for protected functions
@@-- @_Coverage_@ : True if user requested code coverage enable
@@-- @_Package_Name_@ : AADL Package name for the target (e.g. ocarina_porocessors_x86)
@@-- @_CPU_Name_@ : CPU Name (e.g. x86_linux)
......@@ -19,12 +19,8 @@ package @_CAPITALIZE:Partition_Name_@ is
-- CPU Classifier : @_CPU_Classifier_@
-- Bound Functions : @_Bound_Functions_@
@@TABLE@@
@_Threads_@ @@-- should have 'Indent
@@END_TABLE@@
@_Threads'Indent_@
@@TABLE@@
@_Blocks_@ @@-- should have 'Indent
@@END_TABLE@@
@_Blocks'Indent_@
end @_CAPITALIZE:Partition_Name_@;
......@@ -11,4 +11,4 @@ procedure @_CAPITALIZE:Name_@ is -- @_Direction_@ of function @_Parent_Function
@@TABLE@@
-- @_Param_Names_@ : @_Param_Types_@ (@_Param_Directions_@)
@@END_TABLE@@
end @_CAPITALIZE:Name_@
end @_CAPITALIZE:Name_@;
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