Commit 766649eb authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add case insensitive maps

parent 4a59d226
......@@ -142,8 +142,10 @@ package TASTE.Interface_View is
Instance_Of : Optional_Unbounded_String := Nothing;
end record;
package Function_Maps is new Indefinite_Ordered_Maps (String,
Taste_Terminal_Function);
-- Key for the function map is case insensitive
package Function_Maps is new Indefinite_Ordered_Maps
(Case_Insensitive_String,
Taste_Terminal_Function);
type Connection is
record
......
......@@ -7,6 +7,7 @@ with Ada.Containers.Indefinite_Ordered_Maps,
Ada.Containers.Indefinite_Vectors,
Ada.Strings.Unbounded,
Ada.Strings.Equal_Case_Insensitive,
Ada.Strings.Less_Case_Insensitive,
Text_IO,
GNAT.Strings,
Interfaces.C_Streams,
......@@ -34,6 +35,13 @@ package TASTE.Parser_Utils is
Default_Deployment_View : aliased String := "DeploymentView.aadl";
Default_Data_View : aliased String := "DataView.aadl";
-- Create a case insensitive string type, that can be used as keys for maps
subtype Case_Insensitive_String is String;
function "="(Left, Right : Case_Insensitive_String) return Boolean
renames Ada.Strings.Equal_Case_Insensitive;
function "<"(Left, Right : Case_Insensitive_String) return Boolean
renames Ada.Strings.Less_Case_Insensitive;
package ATN renames Ocarina.ME_AADL.AADL_Tree.Nodes;
package AIN renames Ocarina.ME_AADL.AADL_Instances.Nodes;
function US (Source : String) return Unbounded_String renames
......
package TASTE.Parser_Version is
Parser_Release : constant String :=
"a5a6a69 ; Commit Date: Sat Mar 24 11:11:41 2018 ";
"4a59d22 ; Commit Date: Sat Mar 24 11:11:41 2018 ";
Ocarina_Version : constant String :=
"Ocarina 2017.x (Working Copy from r2a52334)";
end TASTE.Parser_Version;
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment