Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
buildsupport
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
buildsupport
Commits
2f56caee
Commit
2f56caee
authored
Mar 30, 2017
by
Maxime Perrotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setup parsing of context parameters
parent
991ebcff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
12 deletions
+21
-12
ada/buildsupport.adb
ada/buildsupport.adb
+0
-8
ada/buildsupport_utils.adb
ada/buildsupport_utils.adb
+16
-0
ada/buildsupport_utils.ads
ada/buildsupport_utils.ads
+5
-4
No files found.
ada/buildsupport.adb
View file @
2f56caee
...
@@ -269,8 +269,6 @@ procedure BuildSupport is
...
@@ -269,8 +269,6 @@ procedure BuildSupport is
NA
:
constant
Name_Array
:=
NA
:
constant
Name_Array
:=
Get_Source_Text
(
Asn1type
);
Get_Source_Text
(
Asn1type
);
FS_File
:
Unbounded_String
;
FS_File
:
Unbounded_String
;
-- For the Ada AST:
CP
:
Context_Parameter
;
begin
begin
-- Some special DATA components have no
-- Some special DATA components have no
-- Source_Text property in DataView.aadl
-- Source_Text property in DataView.aadl
...
@@ -288,12 +286,6 @@ procedure BuildSupport is
...
@@ -288,12 +286,6 @@ procedure BuildSupport is
To_String
(
FS_file
),
To_String
(
FS_file
),
To_String
(
FS_file
)'
Length
,
To_String
(
FS_file
)'
Length
,
FS_Fullname
);
FS_Fullname
);
CP
:=
(
Name
=>
US
(
FS_Fullname
),
Sort
=>
US
(
FS_type
),
Default_Value
=>
US
(
FS_value
),
ASN1_Module
=>
US
(
FS_module
),
ASN1_File_Name
=>
FS_file
);
pragma
Unreferenced
(
CP
);
end
;
end
;
end
if
;
end
if
;
FV_Subco
:=
Next_Node
(
FV_Subco
);
FV_Subco
:=
Next_Node
(
FV_Subco
);
...
...
ada/buildsupport_utils.adb
View file @
2f56caee
...
@@ -400,6 +400,8 @@ package body Buildsupport_Utils is
...
@@ -400,6 +400,8 @@ package body Buildsupport_Utils is
-- To get the optional zip filename where user code is stored:
-- To get the optional zip filename where user code is stored:
Source_Text
:
constant
Name_Array
:=
Get_Source_Text
(
Inst
);
Source_Text
:
constant
Name_Array
:=
Get_Source_Text
(
Inst
);
Zip_Id
:
Name_Id
:=
No_Name
;
Zip_Id
:
Name_Id
:=
No_Name
;
-- To get the context parameters
Subco
:
Node_Id
;
begin
begin
Result
.
Name
:=
US
(
Name
);
Result
.
Name
:=
US
(
Name
);
Result
.
Language
:=
Get_Source_Language
(
Inst
);
Result
.
Language
:=
Get_Source_Language
(
Inst
);
...
@@ -407,6 +409,20 @@ package body Buildsupport_Utils is
...
@@ -407,6 +409,20 @@ package body Buildsupport_Utils is
Zip_Id
:=
Source_Text
(
1
);
Zip_Id
:=
Source_Text
(
1
);
Result
.
Zip_File
:=
Just
(
US
(
Get_Name_String
(
Zip_Id
)));
Result
.
Zip_File
:=
Just
(
US
(
Get_Name_String
(
Zip_Id
)));
end
if
;
end
if
;
-- Parse context parameters
if
Present
(
AIN
.
Subcomponents
(
Inst
))
then
Subco
:=
AIN
.
First_Node
(
AIN
.
Subcomponents
(
Inst
));
while
Present
(
Subco
)
loop
case
Get_Category_Of_Component
(
Subco
)
is
when
CC_Data
=>
null
;
when
others
=>
null
;
end
case
;
Subco
:=
AIN
.
Next_Node
(
Subco
);
end
loop
;
end
if
;
return
Result
;
return
Result
;
end
Parse_Function
;
end
Parse_Function
;
...
...
ada/buildsupport_utils.ads
View file @
2f56caee
...
@@ -105,6 +105,9 @@ package Buildsupport_Utils is
...
@@ -105,6 +105,9 @@ package Buildsupport_Utils is
-- Types needed to build the AST of the TASTE Interface View in Ada
-- Types needed to build the AST of the TASTE Interface View in Ada
type
Parameter_Direction
is
(
param_in
,
param_out
);
type
Parameter_Direction
is
(
param_in
,
param_out
);
package
Option_UString
is
new
Option_Type
(
Unbounded_String
);
use
Option_UString
;
type
ASN1_Parameter
is
type
ASN1_Parameter
is
record
record
Name
:
Unbounded_String
;
Name
:
Unbounded_String
;
...
@@ -139,18 +142,16 @@ package Buildsupport_Utils is
...
@@ -139,18 +142,16 @@ package Buildsupport_Utils is
Sort
:
Unbounded_String
;
Sort
:
Unbounded_String
;
Default_Value
:
Unbounded_String
;
Default_Value
:
Unbounded_String
;
ASN1_Module
:
Unbounded_String
;
ASN1_Module
:
Unbounded_String
;
ASN1_File_Name
:
Unbounded_String
;
ASN1_File_Name
:
Option
(
Present
=>
False
)
;
end
record
;
end
record
;
package
Ctxt_Params
is
new
Indefinite_Vectors
(
Natural
,
Context_Parameter
);
package
Ctxt_Params
is
new
Indefinite_Vectors
(
Natural
,
Context_Parameter
);
package
Option_Zip
is
new
Option_Type
(
Unbounded_String
);
use
Option_Zip
;
type
Taste_Terminal_Function
is
type
Taste_Terminal_Function
is
record
record
Name
:
Unbounded_String
;
Name
:
Unbounded_String
;
Language
:
Supported_Source_Language
;
Language
:
Supported_Source_Language
;
Zip_File
:
Option
_Zip
.
Option
(
False
)
:=
Nothing
;
Zip_File
:
Option
(
Present
=>
False
)
;
Context_Params
:
Ctxt_Params
.
Vector
;
Context_Params
:
Ctxt_Params
.
Vector
;
User_Properties
:
Property_Maps
.
Map
;
User_Properties
:
Property_Maps
.
Map
;
Timers
:
String_Vectors
.
Vector
;
Timers
:
String_Vectors
.
Vector
;
...
...
Write
Preview
Markdown
is supported
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