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
974eb84e
Commit
974eb84e
authored
Jul 05, 2017
by
Maxime Perrotin
Browse files
clear history from buildsupport
parent
3a4dff88
Changes
7
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
974eb84e
UNAME
:=
$(
shell
uname
)
CC
=
gcc
exec
=
buildsupport
exec
=
taste-aadl-parser
all
:
build
build
:
ifeq
($(UNAME), Linux)
@
echo
"package
Buildsupport
_Version is"
>
ada/buildsupport
_version.ads.new
@
echo
-n
"
Buildsupport
_Release : constant String :=
\n
\"
"
>>
ada/buildsupport
_version.ads.new
@
git log
--oneline
|
head
-1
|
cut
-f1
-d
' '
|
tr
-d
'\012'
>>
ada/buildsupport
_version.ads.new
@
echo
" ; Commit "
|
tr
-d
'\r\n'
>>
ada/buildsupport
_version.ads.new
@
git log |
head
-3
|
tail
-1
|
cut
-f1
-d
"+"
|
tr
-d
'\r\n'
>>
ada/buildsupport
_version.ads.new
@
echo
"
\"
;"
>>
ada/buildsupport
_version.ads.new
@
echo
-n
"end
Buildsupport
_Version;"
>>
ada/buildsupport
_version.ads.new
@
if
[
!
-f
"
ada/buildsupport
_version.ads"
]
;
then
\
mv
ada/buildsupport
_version.ads.new
ada/buildsupport
_version.ads
;
\
@
echo
"package
Parser
_Version is"
>
src/parser
_version.ads.new
@
echo
-n
"
Parser
_Release : constant String :=
\n
\"
"
>>
src/parser
_version.ads.new
@
git log
--oneline
|
head
-1
|
cut
-f1
-d
' '
|
tr
-d
'\012'
>>
src/parser
_version.ads.new
@
echo
" ; Commit "
|
tr
-d
'\r\n'
>>
src/parser
_version.ads.new
@
git log |
head
-3
|
tail
-1
|
cut
-f1
-d
"+"
|
tr
-d
'\r\n'
>>
src/parser
_version.ads.new
@
echo
"
\"
;"
>>
src/parser
_version.ads.new
@
echo
-n
"end
Parser
_Version;"
>>
src/parser
_version.ads.new
@
if
[
!
-f
"
src/parser
_version.ads"
]
;
then
\
mv
src/parser
_version.ads.new
src/parser
_version.ads
;
\
else
\
MD1
=
`
cat
ada/buildsupport
_version.ads |
md5sum
`
;
\
MD2
=
`
cat
ada/buildsupport
_version.ads.new |
md5sum
`
;
\
MD1
=
`
cat
src/parser
_version.ads |
md5sum
`
;
\
MD2
=
`
cat
src/parser
_version.ads.new |
md5sum
`
;
\
if
[
"
$$
MD1"
!=
"
$$
MD2"
]
;
then
\
mv
ada/buildsupport
_version.ads.new
ada/buildsupport
_version.ads
;
\
mv
src/parser
_version.ads.new
src/parser
_version.ads
;
\
else
\
rm
ada/buildsupport
_version.ads.new
;
\
rm
src/parser
_version.ads.new
;
\
fi
;
\
fi
endif
ADA_PROJECT_PATH
=
`
ocarina-config
--prefix
`
/lib/gnat:
$$
ADA_PROJECT_PATH
\
$(gnatpath)
gprbuild
-x
-g
$(exec)
-p
-P
buildsupport
.gpr
-XBUILD
=
"debug"
$(gnatpath)
gprbuild
-x
-g
$(exec)
-p
-P
aadl-parser
.gpr
-XBUILD
=
"debug"
install
:
$(MAKE)
cp
buildsupport
`
ocarina-config
--prefix
`
/bin/
cp
misc/driveGnuPlotsStreams.pl
`
ocarina-config
--prefix
`
/bin/
cp
taste-aadl-parser
`
ocarina-config
--prefix
`
/bin/
clean
:
rm
-rf
tmpBuild
$(exec)
*
~
...
...
ada/buildsupport
.adb
→
src/aadl_parser
.adb
View file @
974eb84e
-- *************************** buildsupport **************************** --
-- ************************ TASTE AADL Parser ************************** --
-- Based on Ocarina **************************************************** --
-- (c) 2017 European Space Agency - maxime.perrotin@esa.int
-- LGPL license, see LICENSE file
-- pragma Style_Checks (Off);
with
Ada
.
Strings
.
Unbounded
,
Ada
.
Characters
.
Handling
,
Ada
.
Command_Line
,
...
...
@@ -28,7 +28,7 @@ with Ada.Strings.Unbounded,
Ocarina
.
Parser
,
Ocarina
.
FE_AADL
.
Parser
,
Imported_Routines
,
Buildsupport
_Utils
,
Parser
_Utils
,
Ocarina
.
Backends
.
Utils
;
use
Ada
.
Strings
.
Unbounded
,
...
...
@@ -47,11 +47,11 @@ use Ada.Strings.Unbounded,
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nodes
,
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nutils
,
Ocarina
.
Backends
.
Properties
,
Buildsupport
_Utils
,
Parser
_Utils
,
GNAT
.
OS_Lib
,
Imported_Routines
;
procedure
BuildSupport
is
procedure
AADL_Parser
is
package
ATN
renames
Ocarina
.
ME_AADL
.
AADL_Tree
.
Nodes
;
...
...
@@ -618,29 +618,6 @@ procedure BuildSupport is
end
if
;
end
Process_Interface_View
;
-----------------------------
-- Process_DataView --
-----------------------------
-- procedure Process_DataView (My_Root : Node_Id) is
-- CI : Node_Id;
-- begin
-- Subs := My_Root;
-- while Present (Subs) loop
-- CI := Subs;
-- if Get_Category_Of_Component (CI) = CC_Data then
-- declare
-- SourceText : constant Name_Array := Get_Source_Text (CI);
-- begin
-- if SourceText'Length > 0 then
-- Put_Line (Get_Name_String (SourceText (1)));
-- end if;
-- end;
-- end if;
-- Subs := Next_Node (Subs);
-- end loop;
-- end Process_DataView;
-----------------------------
-- Process_Deployment_View --
-----------------------------
...
...
@@ -1273,7 +1250,7 @@ procedure BuildSupport is
then
C_Set_Gateway
;
-- The "test" flag activates a function in
buildsupport
,
-- The "test" flag activates a function in
the parser
,
-- used for debugging purposes (e.g. dump of the model after
-- all preprocessings). Users need not use it.
elsif
Ada
.
Command_Line
.
Argument
(
J
)
=
"--test"
...
...
@@ -1419,7 +1396,7 @@ procedure BuildSupport is
Put_Line
(
"Note: the generation of glue code is invoked automatically"
);
Put_Line
(
"from the TASTE orchestrator. You should run
buildsupport
"
);
(
"from the TASTE orchestrator. You should run
taste-aadl-parser
"
);
Put_Line
(
"only to generate your application skeletons ('-gw' flag)."
);
New_line
;
...
...
@@ -1508,4 +1485,4 @@ begin
exception
when
E
:
others
=>
Errors
.
Display_Bug_Box
(
E
);
end
BuildSupport
;
end
AADL_Parser
;
ada
/imported_routines.ads
→
src
/imported_routines.ads
View file @
974eb84e
-- ************************
*** buildsupport
**************************** --
-- ************************
taste aadl parser
**************************** --
-- (c) 2015 European Space Agency - maxime.perrotin@esa.int
-- LGPL license, see LICENSE file
...
...
ada
/option_type.ads
→
src
/option_type.ads
View file @
974eb84e
-- ************************
*** buildsupport
**************************** --
-- ************************
taste aadl parser
**************************** --
-- (c) 2008-2017 European Space Agency - maxime.perrotin@esa.int
-- LGPL license, see LICENSE file
-- Define a generic Option type
...
...
ada/buildsupport
_utils.adb
→
src/parser
_utils.adb
View file @
974eb84e
-- ***************************
buildsupport ***
************************* --
-- ***************************
taste aadl parser
************************* --
-- (c) 2008-2017 European Space Agency - maxime.perrotin@esa.int
-- LGPL license, see LICENSE file
with
Ada
.
Text_IO
,
GNAT
.
OS_Lib
,
Buildsupport
_Version
,
Parser
_Version
,
Ocarina
.
Configuration
,
Ocarina
.
AADL_Values
,
Ocarina
.
Instances
.
Queries
,
...
...
@@ -13,7 +13,7 @@ with Ada.Text_IO,
Ocarina
.
Backends
.
Utils
,
Ada
.
Characters
.
Latin_1
;
package
body
Buildsupport
_Utils
is
package
body
Parser
_Utils
is
use
Ada
.
Text_IO
,
GNAT
.
OS_Lib
,
...
...
@@ -30,8 +30,8 @@ package body Buildsupport_Utils is
procedure
Banner
is
The_Banner
:
constant
String
:=
"TASTE
Buildsupport
(Version "
&
Buildsupport_Version
.
Buildsupport
_Release
&
") "
"TASTE
AADL Parser
(Version "
&
Parser_Version
.
Parser
_Release
&
") "
&
ASCII
.
LF
&
ASCII
.
CR
&
"Contact: Maxime.Perrotin@esa.int or Thanassis.Tsiodras@esa.int"
&
ASCII
.
LF
&
ASCII
.
CR
...
...
@@ -47,7 +47,7 @@ package body Buildsupport_Utils is
procedure
Usage
is
begin
Put_Line
(
"Usage:
buildsupport
<options> otherfiles"
);
(
"Usage:
taste-aadl-parser
<options> otherfiles"
);
Put_Line
(
"Where <options> are:"
);
New_Line
;
...
...
@@ -74,7 +74,7 @@ package body Buildsupport_Utils is
Put
(
"-x, --timer <timer-resolution in ms>"
&
HT
);
Put_Line
(
"Set the timer resolution (default 100 ms)"
);
Put
(
"-v, --version"
&
HT
&
HT
&
HT
&
HT
);
Put_Line
(
"Display
buildsupport
version number"
);
Put_Line
(
"Display
taste-aadl-parser
version number"
);
Put
(
"-p, --polyorb-hi-c"
&
HT
&
HT
&
HT
);
Put_Line
(
"Interface glue code with PolyORB-HI-C"
);
Put
(
"otherfiles"
&
HT
&
HT
&
HT
&
HT
);
...
...
@@ -84,7 +84,7 @@ package body Buildsupport_Utils is
Put_Line
(
"For example, this command will generate your application"
&
" skeletons:"
);
New_Line
;
Put_Line
(
"
buildsupport
-i InterfaceView.aadl -d DataView.aadl"
Put_Line
(
"
taste-aadl-parser
-i InterfaceView.aadl -d DataView.aadl"
&
" -o code --gw --keep-case"
);
New_Line
;
...
...
@@ -662,4 +662,4 @@ package body Buildsupport_Utils is
Nested_Conn
=>
Routes_Map
);
end
AADL_to_Ada_IV
;
end
Buildsupport
_Utils
;
end
Parser
_Utils
;
ada/buildsupport
_utils.ads
→
src/parser
_utils.ads
View file @
974eb84e
-- ***************************
buildsupport *****
*********************** --
-- ***************************
taste aadl parser
*********************** --
-- (c) 2017 European Space Agency - maxime.perrotin@esa.int
-- LGPL license, see LICENSE file
-- Set of helper functions for
buildsupport
-- Set of helper functions for
the parser
with
Ocarina
,
-- Ocarina.Types,
Ocarina
.
Types
,
...
...
@@ -24,7 +24,7 @@ use Ocarina,
Ada
.
Containers
,
Ada
.
Strings
.
Unbounded
;
package
Buildsupport
_Utils
is
package
Parser
_Utils
is
package
ATN
renames
Ocarina
.
ME_AADL
.
AADL_Tree
.
Nodes
;
package
AIN
renames
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nodes
;
...
...
@@ -189,4 +189,4 @@ package Buildsupport_Utils is
-- Function to build up the Ada AST by transforming the one from Ocarina
function
AADL_to_Ada_IV
(
System
:
Node_Id
)
return
Complete_Interface_View
;
end
Buildsupport
_Utils
;
end
Parser
_Utils
;
ada/buildsupport
_version.ads
→
src/parser
_version.ads
View file @
974eb84e
package
Buildsupport
_Version
is
Buildsupport
_Release
:
constant
String
:=
package
Parser
_Version
is
Parser
_Release
:
constant
String
:=
"ab23a8c ; Commit Date: Tue Jun 20 14:06:07 2017 "
;
end
Buildsupport_Version
;
\ No newline at end of file
end
Parser_Version
;
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