Commit 2f678219 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Work on build script generation from templates

parent 591cc722
with Text_IO,
Templates_Parser,
TASTE.Templates;
use Text_IO,
Templates_Parser,
TASTE.Templates;
package body TASTE.Backend.Build_Script is
procedure Generate (Model : TASTE_Model) is
Vec_Code : Tag;
Vec_Zip : Tag;
Vec_Func : Tag;
begin
for Each of Model.Interface_View.Flat_Functions loop
New_Set;
Tmpl_Map ("Function_Name", Each.Name);
Tmpl_Map ("Language", Each.Language'Img);
declare
Element_Code : constant String := TASTE.Templates.Generate
(Model.Configuration.Binary_Path.all
& "templates/build-script-gencode.tmplt");
Element_Zip : constant String := TASTE.Templates.Generate
(Model.Configuration.Binary_Path.all
& "templates/build-script-zip.tmplt");
Element_Func : constant String := TASTE.Templates.Generate
(Model.Configuration.Binary_Path.all
& "templates/build-script-func.tmplt");
begin
Vec_Code := Vec_Code & Element_Code;
Vec_Zip := Vec_Zip & Element_Zip;
Vec_Func := Vec_Func & Element_Func;
end;
end loop;
Put_Line ("==== Generating build script ====");
New_Set;
Tmpl_Map ("Interface_View_Path", Model.Configuration.Interface_View.all);
Tmpl_Map ("Output_Path", Model.Configuration.Output_Dir.all);
Tmpl_Map ("Generate_Code", "# TODO");
Tmpl_Map ("Zip_Code", "# TODO");
Tmpl_Map ("Functions", "# TODO \");
Tmpl_Map ("Generate_Code", Vec_Code);
Tmpl_Map ("Zip_Code", Vec_Zip);
Tmpl_Map ("Functions", Vec_Func);
Tmpl_Map ("CodeCoverage", "# TODO");
Put_Line (TASTE.Templates.Generate (Model.Configuration.Binary_Path.all
......
package TASTE.Parser_Version is
Parser_Release : constant String :=
"e27993a ; Commit Date: Wed Jan 3 07:07:48 2018 ";
"591cc72 ; Commit Date: Wed Jan 3 07:46:41 2018 ";
Ocarina_Version : constant String :=
"Ocarina 2017.x (Working Copy from rd078c54)";
end TASTE.Parser_Version;
\ No newline at end of file
--sub<Language> <Function_Name> \
# Generate code for function "<Function_Name>" implemented in "<Language>"
# Zip code of function <Function_Name>
......@@ -40,9 +40,13 @@ INTERFACEVIEW=<Interface_View_Path>
# Output path were the user code was generated
SKELS=<Output_Path>
@@TABLE@@
<Generate_Code>
@@END_TABLE@@
@@TABLE@@
<Zip_Code>
@@END_TABLE@@
if [ -f ConcurrencyView.pro ]
then
......
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