Commit 0158a248 authored by jhugues's avatar jhugues

* Extend support for property types with "list of"



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@5762 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 39a85f98
...@@ -7,71 +7,70 @@ property set Communication_Properties is ...@@ -7,71 +7,70 @@ property set Communication_Properties is
Fan_Out_Policy: enumeration (Broadcast, RoundRobin, Selective, OnDemand) Fan_Out_Policy: enumeration (Broadcast, RoundRobin, Selective, OnDemand)
applies to (port); applies to (port);
-- XXX not supported by Ocarina Connection_Pattern: list of list of Supported_Connection_Patterns
-- Connection_Pattern: list of list of Supported_Connection_Patterns applies to (connection);
-- applies to (connection);
Connection_Set: list of Connection_Pair
-- Connection_Set: list of Connection_Pair applies to (connection);
-- applies to (connection);
Connection_Pair: type record (
-- Connection_Pair: type record ( src: list of aadlinteger;
-- src: list of aadlinteger; dst: list of aadlinteger;);
-- dst: list of aadlinteger;);
Overflow_Handling_Protocol: enumeration (DropOldest, DropNewest, Error) => DropOldest Overflow_Handling_Protocol: enumeration (DropOldest, DropNewest, Error) => DropOldest
applies to (event port, event data port, subprogram access); applies to (event port, event data port, subprogram access);
Queue_Processing_Protocol: Supported_Queue_Processing_Protocols => FIFO Queue_Processing_Protocol: Supported_Queue_Processing_Protocols => FIFO
applies to (event port, event data port, subprogram access); applies to (event port, event data port, subprogram access);
Queue_Size: aadlinteger 0 .. Max_Queue_Size => 1 Queue_Size: aadlinteger 0 .. Max_Queue_Size => 1
applies to (event port, event data port, subprogram access); applies to (event port, event data port, subprogram access);
Required_Connection: aadlboolean => true Required_Connection: aadlboolean => true
applies to (feature); applies to (feature);
Timing: enumeration (sampled, immediate, delayed) => sampled Timing: enumeration (sampled, immediate, delayed) => sampled
applies to (port connection); applies to (port connection);
Transmission_Type: enumeration (push, pull) Transmission_Type: enumeration (push, pull)
applies to (data port, port connection, bus, virtual bus); applies to (data port, port connection, bus, virtual bus);
Input_Rate: Rate_Spec => (Value_Range => 1.0 .. 1.0; Rate_Unit => PerDispatch; Rate_Distribution => Fixed;) Input_Rate: Rate_Spec => (Value_Range => 1.0 .. 1.0; Rate_Unit => PerDispatch; Rate_Distribution => Fixed;)
applies to (port); applies to (port);
Input_Time: list of IO_Time_Spec => ((Time => Dispatch; Offset => 0 ns .. 0 ns;)) Input_Time: list of IO_Time_Spec => ((Time => Dispatch; Offset => 0 ns .. 0 ns;))
applies to (port); applies to (port);
IO_Time_Spec: type record ( IO_Time_Spec: type record (
Offset: Time_Range; Offset: Time_Range;
Time: IO_Reference_Time; Time: IO_Reference_Time;
); );
IO_Reference_Time: type enumeration (Dispatch, Start, Completion, Deadline, NoIO); IO_Reference_Time: type enumeration (Dispatch, Start, Completion, Deadline, NoIO);
Output_Rate: Rate_Spec => (Value_Range => 1.0 .. 1.0; Rate_Unit => PerDispatch; Rate_Distribution => Fixed;) Output_Rate: Rate_Spec => (Value_Range => 1.0 .. 1.0; Rate_Unit => PerDispatch; Rate_Distribution => Fixed;)
applies to (port); applies to (port);
Output_Time: list of IO_Time_Spec => ((Time => Completion; Offset => 0 ns .. 0 ns;)) Output_Time: list of IO_Time_Spec => ((Time => Completion; Offset => 0 ns .. 0 ns;))
applies to (port); applies to (port);
Rate_Spec: type record ( Rate_Spec: type record (
Value_Range: range of aadlreal; Value_Range: range of aadlreal;
Rate_Unit: enumeration (PerSecond, PerDispatch); Rate_Unit: enumeration (PerSecond, PerDispatch);
Rate_Distribution: Supported_Distributions; Rate_Distribution: Supported_Distributions;
); );
Subprogram_Call_Rate: Rate_Spec => (Value_Range => 1.0 .. 1.0; Rate_Unit => PerDispatch; Rate_Distribution => Fixed;) Subprogram_Call_Rate: Rate_Spec => (Value_Range => 1.0 .. 1.0; Rate_Unit => PerDispatch; Rate_Distribution => Fixed;)
applies to (subprogram access); applies to (subprogram access);
Transmission_Time: record ( Transmission_Time: record (
Fixed: Time_Range; Fixed: Time_Range;
PerByte: Time_Range;) PerByte: Time_Range;)
applies to (bus); applies to (bus);
Actual_Latency: Time_Range Actual_Latency: Time_Range
applies to (flow, connection, bus, processor, device, port); applies to (flow, connection, bus, processor, device, port);
Latency: Time_Range Latency: Time_Range
applies to (flow, connection, bus, processor, device, port); applies to (flow, connection, bus, processor, device, port);
end Communication_Properties; end Communication_Properties;
\ No newline at end of file
...@@ -7,110 +7,109 @@ property set Deployment_Properties is ...@@ -7,110 +7,109 @@ property set Deployment_Properties is
Allowed_Processor_Binding_Class: Allowed_Processor_Binding_Class:
inherit list of classifier (processor, virtual processor, system) inherit list of classifier (processor, virtual processor, system)
applies to (thread, thread group, process, system, virtual processor, device); applies to (thread, thread group, process, system, virtual processor, device);
Allowed_Processor_Binding: inherit list of reference (processor, virtual processor, system) Allowed_Processor_Binding: inherit list of reference (processor, virtual processor, system)
applies to (thread, thread group, process, system, virtual processor, device); applies to (thread, thread group, process, system, virtual processor, device);
Actual_Processor_Binding: inherit list of reference (processor, virtual processor) Actual_Processor_Binding: inherit list of reference (processor, virtual processor)
applies to (thread, thread group, process, system, virtual processor, device); applies to (thread, thread group, process, system, virtual processor, device);
Allowed_Memory_Binding_Class: Allowed_Memory_Binding_Class:
inherit list of classifier (memory, system, processor) inherit list of classifier (memory, system, processor)
applies to (thread, thread group, process, system, device, data, data port, event data port, subprogram, subprogram group, processor); applies to (thread, thread group, process, system, device, data, data port, event data port, subprogram, subprogram group, processor);
Allowed_Memory_Binding: inherit list of reference (memory, system, processor) Allowed_Memory_Binding: inherit list of reference (memory, system, processor)
applies to (thread, thread group, process, system, device, data, data port, event data port, subprogram, subprogram group, processor); applies to (thread, thread group, process, system, device, data, data port, event data port, subprogram, subprogram group, processor);
Actual_Memory_Binding: inherit list of reference (memory) Actual_Memory_Binding: inherit list of reference (memory)
applies to (thread, thread group, process, system, processor, device, data, data port, event data port, subprogram, subprogram group); applies to (thread, thread group, process, system, processor, device, data, data port, event data port, subprogram, subprogram group);
Allowed_Connection_Binding_Class: Allowed_Connection_Binding_Class:
inherit list of classifier (processor, virtual processor, bus, virtual bus, device, memory) inherit list of classifier (processor, virtual processor, bus, virtual bus, device, memory)
applies to (feature, connection, thread, thread group, process, system, virtual bus, port); -- XXX added port applies to (feature, connection, thread, thread group, process, system, virtual bus, port); -- XXX added port
Allowed_Connection_Binding: inherit list of reference (processor, virtual processor, bus, virtual bus, device, memory) Allowed_Connection_Binding: inherit list of reference (processor, virtual processor, bus, virtual bus, device, memory)
applies to (feature, connection, thread, thread group, process, system, virtual bus); applies to (feature, connection, thread, thread group, process, system, virtual bus);
Actual_Connection_Binding: inherit list of reference (processor, virtual processor, bus, virtual bus, device, memory) Actual_Connection_Binding: inherit list of reference (processor, virtual processor, bus, virtual bus, device, memory)
applies to (feature, connection, thread, thread group, process, system, virtual bus); applies to (feature, connection, thread, thread group, process, system, virtual bus);
Allowed_Subprogram_Call: list of reference (subprogram) Allowed_Subprogram_Call: list of reference (subprogram)
applies to (subprogram access); applies to (subprogram access);
Actual_Subprogram_Call: reference (subprogram) Actual_Subprogram_Call: reference (subprogram)
applies to (subprogram access); applies to (subprogram access);
Allowed_Subprogram_Call_Binding: Allowed_Subprogram_Call_Binding:
list of reference (bus, processor, device) list of reference (bus, processor, device)
applies to (subprogram, thread, thread group, process, system); applies to (subprogram, thread, thread group, process, system);
Actual_Subprogram_Call_Binding: list of reference (bus, processor, memory, device) Actual_Subprogram_Call_Binding: list of reference (bus, processor, memory, device)
applies to (subprogram); applies to (subprogram);
Provided_Virtual_Bus_Class: inherit list of classifier (virtual bus) Provided_Virtual_Bus_Class: inherit list of classifier (virtual bus)
applies to (bus, virtual bus, processor, virtual processor, device, memory, system); applies to (bus, virtual bus, processor, virtual processor, device, memory, system);
Required_Virtual_Bus_Class: inherit list of classifier (virtual bus) Required_Virtual_Bus_Class: inherit list of classifier (virtual bus)
applies to (virtual bus, connection, port, thread, thread group, process, system, device); applies to (virtual bus, connection, port, thread, thread group, process, system, device);
Provided_Connection_Quality_Of_Service: inherit list of Supported_Connection_QoS Provided_Connection_Quality_Of_Service: inherit list of Supported_Connection_QoS
applies to (bus, virtual bus, processor, virtual processor, system, device, memory); applies to (bus, virtual bus, processor, virtual processor, system, device, memory);
Required_Connection_Quality_Of_Service: inherit list of Supported_Connection_QoS Required_Connection_Quality_Of_Service: inherit list of Supported_Connection_QoS
applies to (port, connection, virtual bus, thread, thread group, process, system, device); applies to (port, connection, virtual bus, thread, thread group, process, system, device);
-- XXX not supported by Ocarina Not_Collocated: record (
-- Not_Collocated: record ( Targets: list of reference (data, Targets: list of reference (data, thread, process, system, connection);
-- thread, process, system, connection); Location: Location: classifier (processor, memory, bus, system);) applies
-- classifier (processor, memory, bus, system);) applies to (process, system);
-- to (process, system);
Collocated: record ( Targets: list of reference (data, thread,
-- Collocated: record ( Targets: list of reference (data, thread, process, system, connection); Location: classifier
-- process, system, connection); Location: classifier (processor, memory, bus, system);) applies to
-- (processor, memory, bus, system);) applies to (process, system);
-- (process, system);
Allowed_Connection_Type: list of enumeration Allowed_Connection_Type: list of enumeration
(Sampled_Data_Connection, Immediate_Data_Connection, (Sampled_Data_Connection, Immediate_Data_Connection,
Delayed_Data_Connection, Port_Connection, Delayed_Data_Connection, Port_Connection,
Data_Access_Connection, Data_Access_Connection,
Subprogram_Access_Connection) Subprogram_Access_Connection)
applies to (bus, device); applies to (bus, device);
Allowed_Dispatch_Protocol: list of Supported_Dispatch_Protocols Allowed_Dispatch_Protocol: list of Supported_Dispatch_Protocols
applies to (processor, virtual processor); applies to (processor, virtual processor);
Allowed_Period: list of Time_Range Allowed_Period: list of Time_Range
applies to (processor, system, virtual processor); applies to (processor, system, virtual processor);
Allowed_Physical_Access_Class: list of classifier (device, processor, memory, bus) Allowed_Physical_Access_Class: list of classifier (device, processor, memory, bus)
applies to (bus); applies to (bus);
Allowed_Physical_Access: list of reference (device, processor, memory, bus) Allowed_Physical_Access: list of reference (device, processor, memory, bus)
applies to (bus); applies to (bus);
Memory_Protocol: enumeration (execute_only, read_only, write_only, read_write) => read_write Memory_Protocol: enumeration (execute_only, read_only, write_only, read_write) => read_write
applies to (memory); applies to (memory);
Runtime_Protection_Support : aadlboolean Runtime_Protection_Support : aadlboolean
applies to (processor, virtual processor); applies to (processor, virtual processor);
Scheduling_Protocol: inherit list of Supported_Scheduling_Protocols Scheduling_Protocol: inherit list of Supported_Scheduling_Protocols
applies to (virtual processor, processor); applies to (virtual processor, processor);
Preemptive_Scheduler: aadlboolean Preemptive_Scheduler: aadlboolean
applies to (processor); applies to (processor);
Thread_Limit: aadlinteger 0 .. Max_Thread_Limit Thread_Limit: aadlinteger 0 .. Max_Thread_Limit
applies to (processor, virtual processor); applies to (processor, virtual processor);
Priority_Map: list of Priority_Mapping Priority_Map: list of Priority_Mapping
applies to (processor); applies to (processor);
Priority_Mapping: type record ( Priority_Mapping: type record (
Aadl_Priority: aadlinteger; Aadl_Priority: aadlinteger;
RTOS_Priority: aadlinteger;); RTOS_Priority: aadlinteger;);
Priority_Range: range of aadlinteger Priority_Range: range of aadlinteger
applies to (processor, virtual processor); applies to (processor, virtual processor);
end Deployment_Properties; end Deployment_Properties;
...@@ -36,6 +36,7 @@ with Ocarina.ME_AADL.AADL_Tree.Nodes; ...@@ -36,6 +36,7 @@ with Ocarina.ME_AADL.AADL_Tree.Nodes;
with Ocarina.BE_AADL.Properties; with Ocarina.BE_AADL.Properties;
with Ocarina.BE_AADL.Identifiers; with Ocarina.BE_AADL.Identifiers;
with Ocarina.BE_AADL.Components; with Ocarina.BE_AADL.Components;
with Ocarina.BE_AADL.Components.Arrays;
package body Ocarina.BE_AADL.Components.Features is package body Ocarina.BE_AADL.Components.Features is
...@@ -44,6 +45,7 @@ package body Ocarina.BE_AADL.Components.Features is ...@@ -44,6 +45,7 @@ package body Ocarina.BE_AADL.Components.Features is
use Ocarina.BE_AADL.Properties; use Ocarina.BE_AADL.Properties;
use Ocarina.BE_AADL.Identifiers; use Ocarina.BE_AADL.Identifiers;
use Ocarina.BE_AADL.Components; use Ocarina.BE_AADL.Components;
use Ocarina.BE_AADL.Components.Arrays;
------------------- -------------------
-- Print_Feature -- -- Print_Feature --
...@@ -174,6 +176,11 @@ package body Ocarina.BE_AADL.Components.Features is ...@@ -174,6 +176,11 @@ package body Ocarina.BE_AADL.Components.Features is
else else
Print_Token (T_Port); Print_Token (T_Port);
end if; end if;
if Present (Array_Dimensions (Node)) then
Write_Space;
Print_Array_Dimensions (Array_Dimensions (Node));
end if;
end Print_Port_Spec; end Print_Port_Spec;
------------------------------- -------------------------------
......
...@@ -393,6 +393,12 @@ package body Ocarina.BE_AADL.Properties.Values is ...@@ -393,6 +393,12 @@ package body Ocarina.BE_AADL.Properties.Values is
Print_Identifier (Identifier (Node)); Print_Identifier (Identifier (Node));
Write_Space; Write_Space;
Print_Token (T_Colon); Print_Token (T_Colon);
if Is_List (Node) then
Write_Space;
Print_Token (T_List);
Write_Space;
Print_Token (T_Of);
end if;
Write_Space; Write_Space;
Print_Property_Type_Designator (Property_Type_Designator (Node)); Print_Property_Type_Designator (Property_Type_Designator (Node));
Print_Token (T_Semicolon); Print_Token (T_Semicolon);
......
...@@ -253,8 +253,10 @@ package body Ocarina.BE_AADL.Properties is ...@@ -253,8 +253,10 @@ package body Ocarina.BE_AADL.Properties is
end if; end if;
if Is_List (Property_Name_Type (Node)) then if Is_List (Property_Name_Type (Node)) then
Print_Tokens ((T_List, T_Of)); for J in 1 .. Multiplicity (Property_Name_Type (Node)) loop
Write_Space; Print_Tokens ((T_List, T_Of));
Write_Space;
end loop;
end if; end if;
Print_Property_Type_Designator Print_Property_Type_Designator
......
...@@ -63,7 +63,8 @@ package body Ocarina.FE_AADL.Parser.Components.Arrays is ...@@ -63,7 +63,8 @@ package body Ocarina.FE_AADL.Parser.Components.Arrays is
use Ocarina.ME_AADL.AADL_Tree.Nutils; use Ocarina.ME_AADL.AADL_Tree.Nutils;
pragma Assert (Container /= No_Node pragma Assert (Container /= No_Node
and then (Kind (Container) = K_Subcomponent)); and then (Kind (Container) = K_Subcomponent
or else Kind (Container) = K_Port_Spec));
Loc : Location; Loc : Location;
List_Array_Dim : List_Id := No_List; List_Array_Dim : List_Id := No_List;
......
...@@ -35,6 +35,7 @@ with Locations; ...@@ -35,6 +35,7 @@ with Locations;
with Ocarina.ME_AADL.AADL_Tree.Nodes; with Ocarina.ME_AADL.AADL_Tree.Nodes;
with Ocarina.FE_AADL.Lexer; with Ocarina.FE_AADL.Lexer;
with Ocarina.ME_AADL.Tokens; with Ocarina.ME_AADL.Tokens;
with Ocarina.FE_AADL.Parser.Components.Arrays;
with Ocarina.FE_AADL.Parser.Identifiers; with Ocarina.FE_AADL.Parser.Identifiers;
with Ocarina.FE_AADL.Parser.Properties; with Ocarina.FE_AADL.Parser.Properties;
with Ocarina.Builder.AADL.Components.Features; with Ocarina.Builder.AADL.Components.Features;
...@@ -246,6 +247,7 @@ package body Ocarina.FE_AADL.Parser.Components.Features is ...@@ -246,6 +247,7 @@ package body Ocarina.FE_AADL.Parser.Components.Features is
-- port_spec ::= -- port_spec ::=
-- defining_port_identifier : ( in | out | in out ) port_type -- defining_port_identifier : ( in | out | in out ) port_type
-- XXX dimensions ???
-- [ { { port_property_association }+ } ] ; -- [ { { port_property_association }+ } ] ;
-- port_refinement ::= -- port_refinement ::=
...@@ -268,6 +270,7 @@ package body Ocarina.FE_AADL.Parser.Components.Features is ...@@ -268,6 +270,7 @@ package body Ocarina.FE_AADL.Parser.Components.Features is
use Parser.Properties; use Parser.Properties;
use Parser.Identifiers; use Parser.Identifiers;
use Ocarina.Builder.AADL.Components.Features; use Ocarina.Builder.AADL.Components.Features;
use Parser.Components.Arrays;
Class_Ref : Node_Id := No_Node; Class_Ref : Node_Id := No_Node;
Port_Spec : Node_Id := No_Node; Port_Spec : Node_Id := No_Node;
...@@ -277,6 +280,7 @@ package body Ocarina.FE_AADL.Parser.Components.Features is ...@@ -277,6 +280,7 @@ package body Ocarina.FE_AADL.Parser.Components.Features is
Code : Parsing_Code; Code : Parsing_Code;
OK : Boolean; OK : Boolean;
Loc : Location; Loc : Location;
Array_Dimensions : Node_Id;
begin begin
if Is_Refinement then if Is_Refinement then
...@@ -343,6 +347,29 @@ package body Ocarina.FE_AADL.Parser.Components.Features is ...@@ -343,6 +347,29 @@ package body Ocarina.FE_AADL.Parser.Components.Features is
Is_Refinement => Is_Refinement, Is_Refinement => Is_Refinement,
Associated_Entity => Class_Ref); Associated_Entity => Class_Ref);
Save_Lexer (Loc);
Scan_Token;
if Token = T_Left_Square_Bracket then
case AADL_Version is
when AADL_V2 =>
Array_Dimensions := P_Array_Dimensions (Port_Spec);
if No (Array_Dimensions) then
DPE (Code);
Skip_Tokens (T_Semicolon);
return No_Node;
end if;
Set_Array_Dimensions (Port_Spec, Array_Dimensions);
when AADL_V1 =>
DPE (CODE, EMC_Not_Allowed_In_AADL_V1);
Skip_Tokens (T_Semicolon);
return No_Node;
end case;
else
Restore_Lexer (Loc);
end if;
OK := P_Property_Associations (Port_Spec, True, PAT_Simple, Code); OK := P_Property_Associations (Port_Spec, True, PAT_Simple, Code);
if not OK then if not OK then
......
...@@ -82,7 +82,6 @@ package body Ocarina.FE_AADL.Parser.Components.Prototypes is ...@@ -82,7 +82,6 @@ package body Ocarina.FE_AADL.Parser.Components.Prototypes is
Is_Refinement : Boolean; Is_Refinement : Boolean;
OK : Boolean; OK : Boolean;
begin begin
P_Identifier_Refined_To P_Identifier_Refined_To
(Refinable_To_RT (Refinable), (Refinable_To_RT (Refinable),
False, False,
...@@ -146,7 +145,6 @@ package body Ocarina.FE_AADL.Parser.Components.Prototypes is ...@@ -146,7 +145,6 @@ package body Ocarina.FE_AADL.Parser.Components.Prototypes is
end if; end if;
return Prototype; return Prototype;
end P_Prototype_Or_Prototype_Refinement; end P_Prototype_Or_Prototype_Refinement;
-------------------------- --------------------------
...@@ -269,7 +267,6 @@ package body Ocarina.FE_AADL.Parser.Components.Prototypes is ...@@ -269,7 +267,6 @@ package body Ocarina.FE_AADL.Parser.Components.Prototypes is
end if; end if;
return Prototype_Binding; return Prototype_Binding;
end P_Prototype_Binding; end P_Prototype_Binding;
end Ocarina.FE_AADL.Parser.Components.Prototypes; end Ocarina.FE_AADL.Parser.Components.Prototypes;
...@@ -633,7 +633,7 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is ...@@ -633,7 +633,7 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is
-- P_Multi_Valued_Property -- -- P_Multi_Valued_Property --
----------------------------- -----------------------------
-- multi_valued_property ::= list of property_type_designator -- multi_valued_property ::= (list of)+ property_type_designator
-- [ => ( [ default_property_expression -- [ => ( [ default_property_expression
-- { , default_property_expression }* ] ) ] -- { , default_property_expression }* ] ) ]
...@@ -648,7 +648,6 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is ...@@ -648,7 +648,6 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is
Property_Type_Designator : Node_Id; Property_Type_Designator : Node_Id;
Property_Expressions : List_Id; Property_Expressions : List_Id;
Loc : Location; Loc : Location;
begin begin
Valued_Property := New_Node (K_Multi_Valued_Property, Token_Location); Valued_Property := New_Node (K_Multi_Valued_Property, Token_Location);
...@@ -659,7 +658,6 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is ...@@ -659,7 +658,6 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is
end if; end if;
Property_Type_Designator := P_Property_Type_Designator; Property_Type_Designator := P_Property_Type_Designator;
if No (Property_Type_Designator) then if No (Property_Type_Designator) then
-- error when parsing Property_Type_Designator, quit -- error when parsing Property_Type_Designator, quit
return No_Node; return No_Node;
...@@ -694,7 +692,6 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is ...@@ -694,7 +692,6 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is
Set_Property_Type_Designator (Valued_Property, Property_Type_Designator); Set_Property_Type_Designator (Valued_Property, Property_Type_Designator);
Set_Property_Expressions (Valued_Property, Property_Expressions); Set_Property_Expressions (Valued_Property, Property_Expressions);
return Valued_Property; return Valued_Property;
end P_Multi_Valued_Property; end P_Multi_Valued_Property;
...@@ -1766,9 +1763,11 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is ...@@ -1766,9 +1763,11 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is
-- P_Record_Type_Element -- -- P_Record_Type_Element --
---------------------------- ----------------------------
-- XXX To be renamed in P_Record_Field someday ..
-- AADL_V2 -- AADL_V2
-- --
-- defining_field_identifier : property_type_designator -- defining_field_identifier : [list of ] property_type_designator
function P_Record_Type_Element function P_Record_Type_Element
(Container : Node_Id) (Container : Node_Id)
...@@ -1785,6 +1784,7 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is ...@@ -1785,6 +1784,7 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is
Identifier : Node_Id; Identifier : Node_Id;
Record_Element : Node_Id; Record_Element : Node_Id;
Property_Type_Designator : Node_Id; Property_Type_Designator : Node_Id;
Is_List : Boolean := False;
begin begin
Save_Lexer (Loc); Save_Lexer (Loc);
...@@ -1803,6 +1803,21 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is ...@@ -1803,6 +1803,21 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is
Scan_Token; Scan_Token;
if Token = T_Colon then if Token = T_Colon then
Save_Lexer (Loc);
Scan_Token;
if Token = T_List then
Scan_Token;
if Token /= T_Of then
DPE (PC_Record_Type_Element, T_Of);
Skip_Tokens (T_Semicolon);
return No_Node;
end if;
Is_List := True;
else
Restore_Lexer (Loc);
end if;
Property_Type_Designator := P_Property_Type_Designator; Property_Type_Designator := P_Property_Type_Designator;
if No (Property_Type_Designator) then if No (Property_Type_Designator) then
DPE (PC_Record_Type_Element); DPE (PC_Record_Type_Element);
...@@ -1817,6 +1832,7 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is ...@@ -1817,6 +1832,7 @@ package body Ocarina.FE_AADL.Parser.Properties.Values is
Set_Property_Type_Designator (Record_Element, Set_Property_Type_Designator (Record_Element,
Property_Type_Designator); Property_Type_Designator);
Set_Is_List (Record_Element, Is_List);
return Record_Element; return Record_Element;
end P_Record_Type_Element; end P_Record_Type_Element;
......
...@@ -67,12 +67,110 @@ package body Ocarina.FE_AADL.Parser.Properties is ...@@ -67,12 +67,110 @@ package body Ocarina.FE_AADL.Parser.Properties is
function P_Property_Owner_Category return Node_Id; function P_Property_Owner_Category return Node_Id;
function P_Property_Value (Container : Node_Id) return Node_Id;
----------------------
-- P_Property_Value --
----------------------