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
1158948c
Commit
1158948c
authored
Apr 10, 2015
by
yoogx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Adjust parser to address AADLv2.1 parsing of list of records
For ticket #29
parent
9426eaee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
27 deletions
+6
-27
src/frontends/aadl/ocarina-fe_aadl-parser-properties-values.adb
...ontends/aadl/ocarina-fe_aadl-parser-properties-values.adb
+4
-1
src/frontends/aadl/ocarina-fe_aadl-parser-properties.adb
src/frontends/aadl/ocarina-fe_aadl-parser-properties.adb
+2
-26
No files found.
src/frontends/aadl/ocarina-fe_aadl-parser-properties-values.adb
View file @
1158948c
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
4
ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
...
...
@@ -2508,6 +2508,9 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is
return
No_Node
;
end
if
;
when
T_Left_Square_Bracket
=>
return
P_Record_Term
;
when
others
=>
DPE
(
PC_Boolean_Or_Record_Term
);
return
No_Node
;
...
...
src/frontends/aadl/ocarina-fe_aadl-parser-properties.adb
View file @
1158948c
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
4
ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
...
...
@@ -85,7 +85,6 @@ package body Ocarina.FE_AADL.Parser.Properties is
Loc
:
Location
;
Prop_Value
:
Node_Id
;
Parse_List_Of_Properties
:
Boolean
:=
True
;
begin
-- Parse Property_Value
...
...
@@ -93,30 +92,7 @@ package body Ocarina.FE_AADL.Parser.Properties is
Save_Lexer
(
Loc
);
Scan_Token
;
-- The AADLv2 BNF is ambiguous, a string starting with a '('
-- can either be a list of property expressions e.g. "(foo,
-- bar);" _or_ a single_expression containing a record term,
-- e.g. "(foo => 1; bar =>2;)". This look ahead loop scans
-- token to see which case we are currently processing.
declare
Loc2
:
Location
;
begin
Save_Lexer
(
Loc2
);
if
Token
=
T_Left_Parenthesis
then
while
Token
/=
T_Right_Parenthesis
loop
Scan_Token
;
if
Token
=
T_Semicolon
or
else
Token
=
T_Applies
then
Parse_List_Of_Properties
:=
False
;
end
if
;
end
loop
;
else
Parse_List_Of_Properties
:=
False
;
end
if
;
Restore_Lexer
(
Loc2
);
end
;
if
Parse_List_Of_Properties
then
if
Token
=
T_Left_Parenthesis
then
Save_Lexer
(
Loc
);
Scan_Token
;
...
...
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