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
O
Ocarina
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
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
TASTE
Ocarina
Commits
3612e30b
Commit
3612e30b
authored
Feb 06, 2016
by
Jerome Hugues
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/OpenAADL/ocarina
parents
5106afee
b4721732
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
34 deletions
+36
-34
src/backends/ocarina-backends-c_tree-generator.adb
src/backends/ocarina-backends-c_tree-generator.adb
+5
-1
src/backends/ocarina-backends-c_tree-nodes.idl
src/backends/ocarina-backends-c_tree-nodes.idl
+17
-16
src/backends/ocarina-backends-c_tree-nutils.adb
src/backends/ocarina-backends-c_tree-nutils.adb
+4
-2
src/backends/ocarina-backends-c_tree-nutils.ads
src/backends/ocarina-backends-c_tree-nutils.ads
+4
-2
src/backends/ocarina-backends-utils.ads
src/backends/ocarina-backends-utils.ads
+1
-5
src/core/model/ocarina-analyzer-aadl-naming_rules.adb
src/core/model/ocarina-analyzer-aadl-naming_rules.adb
+5
-8
No files found.
src/backends/ocarina-backends-c_tree-generator.adb
View file @
3612e30b
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
6
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
...
...
@@ -1198,6 +1198,10 @@ package body Ocarina.Backends.C_Tree.Generator is
procedure
Generate_Variable_Declaration
(
N
:
Node_Id
)
is
begin
Generate
(
Used_Type
(
N
));
if
Is_Static
(
N
)
then
Write_Space
;
Write
(
Tok_Static
);
end
if
;
Write_Space
;
Generate
(
Defining_Identifier
(
N
));
end
Generate_Variable_Declaration
;
...
...
src/backends/ocarina-backends-c_tree-nodes.idl
View file @
3612e30b
...
...
@@ -61,7 +61,7 @@ module Ocarina::Backends::C_Tree::Nodes {
Name_Id
Name
;
Node_Id
Corresponding_Node
;
Node_Id
Compile_Unit
;
boolean
Is_Pointer
;
boolean
Is_Pointer
;
}
;
interface
Ifdef_Clause
:
Node_Id
{
...
...
@@ -73,7 +73,7 @@ module Ocarina::Backends::C_Tree::Nodes {
interface
Include_Clause
:
Node_Id
{
Node_Id
Header_Name
;
boolean
Is_Local
;
boolean
Is_Local
;
}
;
interface
Includes
:
List_Id
{}
;
...
...
@@ -163,7 +163,7 @@ module Ocarina::Backends::C_Tree::Nodes {
Node_Id
Subprograms_Source
;
Node_Id
Subprograms_Header
;
}
;
interface
Parameter_Specification
:
Definition
{
Node_Id
Parameter_Type
;
}
;
...
...
@@ -178,7 +178,7 @@ module Ocarina::Backends::C_Tree::Nodes {
Node_Id
Return_Type
;
Node_Id
Compile_Unit
;
}
;
/*
*
int
myfunc
(
int
arg1
,
char
arg2
)
*
{
...
...
@@ -192,7 +192,7 @@ module Ocarina::Backends::C_Tree::Nodes {
List_Id
Statements
;
Node_Id
Compile_Unit
;
}
;
/*
*
myfunc
(
arg1
,
arg2
)
;
*/
...
...
@@ -206,7 +206,7 @@ module Ocarina::Backends::C_Tree::Nodes {
/*
*
Example
:
*
Example
:
*
-
typedef
int
my_integer
;
*
-
typedef
struct
{
....
}
my_type
;
*/
...
...
@@ -297,7 +297,7 @@ module Ocarina::Backends::C_Tree::Nodes {
*/
interface
Continue_Statement
:
Node_Id
{
}
;
interface
C_Comment
:
Definition
{
boolean
Has_Header_Spaces
;
}
;
...
...
@@ -339,7 +339,7 @@ module Ocarina::Backends::C_Tree::Nodes {
/*
*
Struct_Aggregate
interface
is
used
*
to
generated
code
like
*
to
generated
code
like
*
struct
struct_name
{
*
member_type
member1
;
*
member_type
member2
;
...
...
@@ -351,7 +351,7 @@ module Ocarina::Backends::C_Tree::Nodes {
/*
*
Used
to
generate
Union
,
generated
code
looks
like
*
the
Struct_Aggregate
*
the
Struct_Aggregate
*/
interface
Union_Aggregate
:
Definition
{
List_Id
Union_Members
;
...
...
@@ -365,15 +365,16 @@ module Ocarina::Backends::C_Tree::Nodes {
List_Id
Enum_Members
;
}
;
/*
Definition
is
used
in
functions
to
/*
Definition
is
used
in
functions
to
*
declare
variables
*
Generated
code
looks
like
:
*
used_type
variable_name
;
*/
interface
Variable_Declaration
:
Definition
{
Node_Id
Used_Type
;
boolean
Is_Static
;
}
;
/*
*
Member_Declaration
is
used
in
unions
*
or
structures
...
...
@@ -403,7 +404,7 @@ module Ocarina::Backends::C_Tree::Nodes {
interface
Literal
:
Node_Id
{
Value_Id
Value
;
}
;
interface
Expression
:
Node_Id
{
Operator_Id
Operator
;
...
...
@@ -457,16 +458,16 @@ module Ocarina::Backends::C_Tree::Nodes {
interface
Tree_Bindings
:
Node_Id
{
/*
Units
*/
Node_Id
Main_Node
;
/*
Entities
*/
Node_Id
Type_Definition_Node
;
Node_Id
Feature_Subprogram_Node
;
Node_Id
Subprogram_Node
;
}
;
}
;
interface
HI_Tree_Bindings
:
Tree_Bindings
{
/*
Units
*/
Node_Id
Internals_Node
;
Node_Id
System_Time_Node
;
Node_Id
Marshaller_Node
;
...
...
src/backends/ocarina-backends-c_tree-nutils.adb
View file @
3612e30b
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
6
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
...
...
@@ -735,13 +735,15 @@ package body Ocarina.Backends.C_Tree.Nutils is
function
Make_Variable_Declaration
(
Defining_Identifier
:
Node_Id
;
Used_Type
:
Node_Id
)
return
Node_Id
Used_Type
:
Node_Id
;
Is_Static
:
Boolean
:=
False
)
return
Node_Id
is
P
:
Node_Id
;
begin
P
:=
New_Node
(
K_Variable_Declaration
);
Set_Defining_Identifier
(
P
,
Defining_Identifier
);
Set_Used_Type
(
P
,
Used_Type
);
Set_Is_Static
(
P
,
Is_Static
);
return
P
;
end
Make_Variable_Declaration
;
...
...
src/backends/ocarina-backends-c_tree-nutils.ads
View file @
3612e30b
...
...
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
6
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
...
...
@@ -70,6 +70,7 @@ package Ocarina.Backends.C_Tree.Nutils is
Tok_Until
,
-- UNTIL
Tok_For
,
-- FOR
Tok_While
,
-- WHILE
Tok_Static
,
-- STATIC
Tok_Switch
,
-- SWITCH
Tok_Typedef
,
-- TYPEDEF
...
...
@@ -354,7 +355,8 @@ package Ocarina.Backends.C_Tree.Nutils is
function
Make_Variable_Declaration
(
Defining_Identifier
:
Node_Id
;
Used_Type
:
Node_Id
)
return
Node_Id
;
Used_Type
:
Node_Id
;
Is_Static
:
Boolean
:=
False
)
return
Node_Id
;
function
Make_Member_Declaration
(
Defining_Identifier
:
Node_Id
;
...
...
src/backends/ocarina-backends-utils.ads
View file @
3612e30b
...
...
@@ -213,11 +213,7 @@ package Ocarina.Backends.Utils is
H_PN_Interconnection
,
H_PN_To_Delete
,
H_PN_Port_Creation
,
H_PN_Proc_Creation
,
H_RTSJ_Subprogram_Spec
,
H_RTSJ_Subprogram_Body
,
H_RTSJ_Type
,
H_RTSJ_Deployment
);
H_PN_Proc_Creation
);
-- These are tags to precise the meaning of "handle"
type
Connection_Pattern_Kind
is
(
Inter_Process
,
Intra_Process
);
...
...
src/core/model/ocarina-analyzer-aadl-naming_rules.adb
View file @
3612e30b
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2009 Telecom ParisTech, 2010-201
6
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
...
...
@@ -302,15 +302,12 @@ package body Ocarina.Analyzer.AADL.Naming_Rules is
if
Present
(
Scope
)
then
Scoped_Identifier
:=
Internal_Node_In_Scope
(
Name_Of_Identifier
,
Scope
);
else
return
No_Node
;
if
Present
(
Scoped_Identifier
)
then
return
Corresponding_Entity
(
Scoped_Identifier
);
end
if
;
end
if
;
if
Present
(
Scoped_Identifier
)
then
return
Corresponding_Entity
(
Scoped_Identifier
);
else
return
No_Node
;
end
if
;
return
No_Node
;
end
Node_Explicitly_In_Scope
;
-------------------
...
...
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