Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
c87b811b
Commit
c87b811b
authored
Jan 03, 2018
by
Maxime Perrotin
Browse files
Iterate on the templates
parent
539e376c
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/taste-backend-build_script.adb
View file @
c87b811b
...
...
@@ -23,9 +23,15 @@ package body TASTE.Backend.Build_Script is
Element_Func
:
constant
String
:=
Parse
(
Prefix
&
"build-script-func.tmplt"
,
Template_Data
);
begin
Vec_Code
:=
Vec_Code
&
Element_Code
;
Vec_Zip
:=
Vec_Zip
&
Element_Zip
;
Vec_Func
:=
Vec_Func
&
Element_Func
;
if
Element_Code
'
Length
>
0
then
Vec_Code
:=
Vec_Code
&
Element_Code
;
end
if
;
if
Element_Zip
'
Length
>
0
then
Vec_Zip
:=
Vec_Zip
&
Element_Zip
;
end
if
;
if
Element_Func
'
Length
>
0
then
Vec_Func
:=
Vec_Func
&
Element_Func
;
end
if
;
end
;
end
loop
;
Put_Line
(
"==== Generating build script ===="
);
...
...
src/taste-parser_version.ads
View file @
c87b811b
package
TASTE
.
Parser_Version
is
Parser_Release
:
constant
String
:=
"
2f67821
; Commit Date: Wed Jan 3
0
8:
43:1
9 2018 "
;
"
539e376
; Commit Date: Wed Jan 3
1
8:
21:3
9 2018 "
;
Ocarina_Version
:
constant
String
:=
"Ocarina 2017.x (Working Copy from rd078c54)"
;
end
TASTE
.
Parser_Version
;
\ No newline at end of file
src/taste-templates.adb
View file @
c87b811b
...
...
@@ -33,6 +33,8 @@ package body TASTE.Templates is
function
Generate
(
Template_Name
:
String
)
return
String
is
(
Parse
(
Template_Name
,
Tmpl_Set
));
begin
Set_Tag_Separators
(
Start_With
=>
"<"
,
Stop_With
=>
">"
);
null
;
-- Don't change the separators, these could conflict with @@IF@@ syntax
-- Set_Tag_Separators (Start_With => "<",
-- Stop_With => ">");
end
TASTE
.
Templates
;
templates/build-script-func.tmplt
View file @
c87b811b
--sub<Language> <Function_Name> \
@@IF@@ @_Language_@ /= "LANGUAGE_GUI"
--sub@_REPLACE(Sdl/Ada):REPLACE(Ada_95/Ada):CAPITALIZE:SLICE(10 .. 0):Language_@ @_Function_Name_@ \
@@END_IF@@
templates/build-script-gencode.tmplt
View file @
c87b811b
# Generate code for function "
<
Function_Name
>"
implemented in "
<
Language
>"
# Generate code for function "
@_
Function_Name
_@
implemented in "
@_
Language
_@
templates/build-script-zip.tmplt
View file @
c87b811b
# Zip code of function
<
Function_Name
>
# Zip code of function
@_
Function_Name
_@
templates/build-script.tmplt
View file @
c87b811b
#!/bin/bash -e
# This script will build your system
# DO NOT EDIT THIS FILE - IT WAS GENERATED BY TASTE
# DO NOT EDIT THIS FILE
# Generated by TASTE on @_Now_@
# If you need additional pre-processing, there are three hook files
# that you can provide and that are called dring the build:
...
...
@@ -35,17 +36,17 @@ USE_POHIC=1
# Set Debug mode by default
DEBUG_MODE
=
--debug
INTERFACEVIEW
=
<
Interface_View_Path
>
INTERFACEVIEW
=
@_
Interface_View_Path
_@
# Output path were the user code was generated
SKELS
=
<
Output_Path
>
SKELS
=
@_
Output_Path
_@
@@TABLE@@
<
Generate_Code
>
@_
Generate_Code
_@
@@END_TABLE@@
@@TABLE@@
<
Zip_Code
>
@_
Zip_Code
_@
@@END_TABLE@@
if
[
-f
ConcurrencyView.pro
]
...
...
@@ -81,13 +82,13 @@ assert-builder-ocarina.py \
--aadlv2
\
--keep-case
\
$DEBUG_MODE
\
--interfaceView
"
$INTERFACEVIEW
"
\
--interfaceView
"
$INTERFACEVIEW
"
\
--deploymentView
"
$DEPLOYMENTVIEW
"
\
-o
"
$OUTPUTDIR
"
\
@@TABLE@@
<
Functions
>
@_REPLACE
((
\n
)
/
)
:
Functions
_@
@@END_TABLE@@
<
CodeCoverage
>
\
@_
CodeCoverage
_@
\
$ORCHESTRATOR_OPTIONS
if
[
-f
user_init_last.sh
]
...
...
templates/configuration.tmplt
View file @
c87b811b
-- TASTE CONFIGURATION ------------------------------------
|
|Interface View :
<
Interface_View
>
|Deployment View :
<
Deployment_View
>
|Data View :
<
Data_View
>
|Interface View :
@_
Interface_View
_@
|Deployment View :
@_
Deployment_View
_@
|Data View :
@_
Data_View
_@
|Other Files :
@@TABLE@@
<
Other_Files
>
@_
Other_Files
_@
@@END_TABLE@@
|Output Directory :
<
Output_Directory
>
|Generate skeletons :
<
Skeletons
>
|Generate glue :
<
Glue
>
|Debug mode :
<
Debug_Flag
>
|Request Version :
<
Version
>
|Timer resolution :
<
Timer_Resolution
>
|Use PolyORB-HI-C :
<
Use_POHIC
>
|Output Directory :
@_
Output_Directory
_@
|Generate skeletons :
@_YES_NO:
Skeletons
_@
|Generate glue :
@_YES_NO:
Glue
_@
|Debug mode :
@_YES_NO:
Debug_Flag
_@
|Request Version :
@_YES_NO:
Version
_@
|Timer resolution :
@_
Timer_Resolution
_@
|Use PolyORB-HI-C :
@_YES_NO:
Use_POHIC
_@
|
-----------------------------------------------------------
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment