Commit 9405df9b authored by yoogx's avatar yoogx
Browse files

* Renamed Namet to Ocarina.Namet, Output to Ocarina.Output to

          avoid collision with external packages
parent f4b3e4ea
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2012 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2014 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 --
......@@ -31,7 +31,7 @@
-- --
------------------------------------------------------------------------------
with Output;
with Ocarina.Output;
with Ocarina.ME_AADL;
with Ocarina.ME_AADL.AADL_Tree.Nodes;
......@@ -44,7 +44,7 @@ with Ocarina.BE_AADL.Properties;
package body Ocarina.BE_AADL.Namespaces is
use Output;
use Ocarina.Output;
use Ocarina.ME_AADL;
use Ocarina.ME_AADL.AADL_Tree.Nodes;
use Ocarina.ME_AADL.AADL_Tree.Nutils;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2012 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2014 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 --
......@@ -31,7 +31,7 @@
-- --
------------------------------------------------------------------------------
with Output;
with Ocarina.Output;
with Charset;
with Ocarina.ME_AADL;
......@@ -47,7 +47,7 @@ with Ocarina.BE_AADL.Components.Arrays;
package body Ocarina.BE_AADL.Properties.Values is
use Output;
use Ocarina.Output;
use Charset;
use Ocarina.ME_AADL;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2012 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2014 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 --
......@@ -31,7 +31,7 @@
-- --
------------------------------------------------------------------------------
with Output;
with Ocarina.Output;
with Ocarina.ME_AADL.AADL_Tree.Nodes;
with Ocarina.ME_AADL.AADL_Tree.Nutils;
......@@ -43,7 +43,7 @@ with Ocarina.BE_AADL.Properties.Values;
package body Ocarina.BE_AADL.Properties is
use Output;
use Ocarina.Output;
use Ocarina.ME_AADL.AADL_Tree.Nodes;
use Ocarina.ME_AADL.AADL_Tree.Nutils;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2012 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2014 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 --
......@@ -34,8 +34,8 @@
with GNAT.OS_Lib; use GNAT.OS_Lib;
with GNAT.Command_Line; use GNAT.Command_Line;
with Namet; use Namet;
with Output; use Output;
with Ocarina.Namet; use Ocarina.Namet;
with Ocarina.Output; use Ocarina.Output;
with Utils; use Utils;
with Ocarina.ME_AADL.AADL_Instances.Nodes;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2012 ESA & ISAE. --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2014 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 --
......@@ -31,7 +31,7 @@
-- --
------------------------------------------------------------------------------
with Output;
with Ocarina.Output;
with Ocarina.ME_AADL_BA;
with Ocarina.ME_AADL_BA.BA_Tree.Nodes;
......@@ -42,7 +42,7 @@ with Ocarina.BE_AADL_BA.Expressions;
package body Ocarina.BE_AADL_BA.Actions is
use Output;
use Ocarina.Output;
use Ocarina.ME_AADL_BA;
use Ocarina.ME_AADL_BA.BA_Tree.Nutils;
use Ocarina.ME_AADL_BA.BA_Tree.Nodes;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2012 ESA & ISAE. --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2014 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 --
......@@ -31,7 +31,7 @@
-- --
------------------------------------------------------------------------------
with Output;
with Ocarina.Output;
with Ocarina.AADL_Values;
......@@ -44,7 +44,7 @@ with Ocarina.BE_AADL_BA.Actions;
package body Ocarina.BE_AADL_BA.Expressions is
use Output;
use Ocarina.Output;
use Ocarina.AADL_Values;
use Ocarina.ME_AADL_BA;
use Ocarina.ME_AADL_BA.BA_Tree.Nutils;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2012 ESA & ISAE. --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2014 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 --
......@@ -31,8 +31,8 @@
-- --
------------------------------------------------------------------------------
with Namet;
with Output;
with Ocarina.Namet;
with Ocarina.Output;
with Ocarina.ME_AADL_BA.BA_Tree.Nodes;
with Ocarina.ME_AADL_BA.BA_Tree.Nutils;
......@@ -40,8 +40,8 @@ with Ocarina.BE_AADL_BA.Expressions;
package body Ocarina.BE_AADL_BA.Identifiers is
use Namet;
use Output;
use Ocarina.Namet;
use Ocarina.Output;
use Ocarina.ME_AADL_BA.BA_Tree.Nodes;
use Ocarina.ME_AADL_BA.BA_Tree.Nutils;
use Ocarina.BE_AADL_BA.Expressions;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2012 ESA & ISAE. --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2014 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 --
......@@ -31,7 +31,7 @@
-- --
------------------------------------------------------------------------------
with Output;
with Ocarina.Output;
with Ocarina.ME_AADL_BA;
with Ocarina.ME_AADL_BA.BA_Tree.Nodes;
......@@ -44,7 +44,7 @@ with Ocarina.BE_AADL_BA.Expressions;
package body Ocarina.BE_AADL_BA.Specifications is
use Output;
use Ocarina.Output;
use Ocarina.ME_AADL_BA;
use Ocarina.ME_AADL_BA.BA_Tree.Nutils;
use Ocarina.ME_AADL_BA.BA_Tree.Nodes;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2012 ESA & ISAE. --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2014 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 --
......@@ -31,7 +31,7 @@
-- --
------------------------------------------------------------------------------
with Output;
with Ocarina.Output;
with Ocarina.ME_AADL_BA;
with Ocarina.ME_AADL_BA.BA_Tree.Nodes;
......@@ -42,7 +42,7 @@ with Ocarina.BE_AADL_BA.Expressions;
package body Ocarina.BE_AADL_BA.Thread_Dispatch is
use Output;
use Ocarina.Output;
use Ocarina.ME_AADL_BA;
use Ocarina.ME_AADL_BA.BA_Tree.Nutils;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2012 ESA & ISAE. --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2014 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 --
......@@ -31,7 +31,7 @@
-- --
------------------------------------------------------------------------------
with Output;
with Ocarina.Output;
with Ocarina.Backends;
......@@ -42,7 +42,7 @@ with Ocarina.BE_AADL_BA.Specifications;
package body Ocarina.BE_AADL_BA is
use Output;
use Ocarina.Output;
use Ocarina.Backends;
use Ocarina.ME_AADL_BA.BA_Tree.Nodes;
use Ocarina.ME_AADL_BA.BA_Tree.Debug;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2012 ESA & ISAE. --
-- Copyright (C) 2009 Telecom ParisTech, 2010-2014 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 --
......@@ -32,8 +32,8 @@
------------------------------------------------------------------------------
with Types;
with Output;
with Namet;
with Ocarina.Output;
with Ocarina.Namet;
with Ocarina.Backends;
with Ocarina.REAL_Values;
with Ocarina.ME_REAL.Tokens;
......@@ -43,7 +43,7 @@ with Ocarina.ME_REAL.REAL_Tree.Utils;
package body Ocarina.BE_REAL is
use Types;
use Output;
use Ocarina.Output;
use Ocarina.ME_REAL.Tokens;
use Ocarina.ME_REAL.REAL_Tree.Nodes;
use Ocarina.ME_REAL.REAL_Tree.Nutils;
......@@ -318,7 +318,7 @@ package body Ocarina.BE_REAL is
procedure Print_Requirement (Node : Node_Id) is
pragma Assert (Kind (Node) = K_Required_Theorem);
use Namet;
use Ocarina.Namet;
begin
Write_Name (Theorem_Name (Node));
end Print_Requirement;
......@@ -378,7 +378,7 @@ package body Ocarina.BE_REAL is
procedure Print_Variable_Decl_Compute (Node : Node_Id) is
pragma Assert (Kind (Node) = K_Variable_Decl_Compute);
use Namet;
use Ocarina.Namet;
begin
Print_Variable_Decl (Node);
Print_Token (T_Compute);
......@@ -572,7 +572,7 @@ package body Ocarina.BE_REAL is
procedure Print_Element (Node : Node_Id) is
pragma Assert (Kind (Node) = K_Element);
use Namet;
use Ocarina.Namet;
begin
Write_Name (Name (Identifier (Node)));
end Print_Element;
......@@ -583,7 +583,7 @@ package body Ocarina.BE_REAL is
procedure Print_Variable (Node : Node_Id) is
pragma Assert (Kind (Node) = K_Var_Reference);
use Namet;
use Ocarina.Namet;
begin
Write_Name (Name (Node));
end Print_Variable;
......@@ -596,7 +596,7 @@ package body Ocarina.BE_REAL is
pragma Assert (Kind (Node) = K_Identifier or else
Kind (Node) = K_Var_Reference or else
Kind (Node) = K_Set_Reference);
use Namet;
use Ocarina.Namet;
begin
Write_Name (Name (Node));
end Print_Identifier;
......@@ -607,7 +607,7 @@ package body Ocarina.BE_REAL is
procedure Print_Token (Token : Token_Type)
is
use Namet;
use Ocarina.Namet;
begin
Write_Str (Image (Token));
end Print_Token;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2012 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2014 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 --
......@@ -34,8 +34,8 @@
with Ada.Command_Line; use Ada.Command_Line;
with GNAT.OS_Lib; use GNAT.OS_Lib;
with GNAT.Directory_Operations; use GNAT.Directory_Operations;
with Output; use Output;
with Namet; use Namet;
with Ocarina.Output; use Ocarina.Output;
with Ocarina.Namet; use Ocarina.Namet;
package body Errors is
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2012 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2014 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 --
......@@ -33,7 +33,7 @@
with GNAT.Directory_Operations;
with Namet;
with Ocarina.Namet;
with Types; use type Types.Name_Id, Types.Int, Types.Text_Ptr;
package body Locations is
......@@ -58,26 +58,26 @@ package body Locations is
-- other words, this function must not have side effect.
-- Save name buffer to restore it later on
Backup := Namet.Name_Find;
Backup := Ocarina.Namet.Name_Find;
Namet.Get_Name_String (Loc.Base_Name);
Namet.Add_Char_To_Name_Buffer (':');
Namet.Add_Nat_To_Name_Buffer (Types.Nat (Loc.Line));
Namet.Add_Char_To_Name_Buffer (':');
Ocarina.Namet.Get_Name_String (Loc.Base_Name);
Ocarina.Namet.Add_Char_To_Name_Buffer (':');
Ocarina.Namet.Add_Nat_To_Name_Buffer (Types.Nat (Loc.Line));
Ocarina.Namet.Add_Char_To_Name_Buffer (':');
if Column < 10 then
Namet.Add_Char_To_Name_Buffer ('0');
Ocarina.Namet.Add_Char_To_Name_Buffer ('0');
end if;
Namet.Add_Nat_To_Name_Buffer (Column);
Result := Namet.Name_Find;
Ocarina.Namet.Add_Nat_To_Name_Buffer (Column);
Result := Ocarina.Namet.Name_Find;
-- Restore backup into name buffer
if Backup /= Types.No_Name then
Namet.Get_Name_String (Backup);
Ocarina.Namet.Get_Name_String (Backup);
end if;
-- Return result using a Get_Name_String variant with no side effect
return Namet.Get_Name_String (Result);
return Ocarina.Namet.Get_Name_String (Result);
end if;
end Image;
......@@ -93,11 +93,11 @@ package body Locations is
is
begin
Loc.Base_Name :=
Namet.Get_String_Name (GNAT.Directory_Operations.Base_Name
(Namet.Get_Name_String (Name)));
Ocarina.Namet.Get_String_Name (GNAT.Directory_Operations.Base_Name
(Ocarina.Namet.Get_Name_String (Name)));
Loc.Dir_Name :=
Namet.Get_String_Name (GNAT.Directory_Operations.Dir_Name
(Namet.Get_Name_String (Name)));
Ocarina.Namet.Get_String_Name (GNAT.Directory_Operations.Dir_Name
(Ocarina.Namet.Get_Name_String (Name)));
Loc.Line := 1;
Loc.First_Pos := 1;
Loc.Last_Pos := 1;
......@@ -118,11 +118,11 @@ package body Locations is
begin
Loc.Line := Line;
Loc.Base_Name :=
Namet.Get_String_Name (GNAT.Directory_Operations.Base_Name
(Namet.Get_Name_String (Name)));
Ocarina.Namet.Get_String_Name (GNAT.Directory_Operations.Base_Name
(Ocarina.Namet.Get_Name_String (Name)));
Loc.Dir_Name :=
Namet.Get_String_Name (GNAT.Directory_Operations.Dir_Name
(Namet.Get_Name_String (Name)));
Ocarina.Namet.Get_String_Name (GNAT.Directory_Operations.Dir_Name
(Ocarina.Namet.Get_Name_String (Name)));
end Update_Name_And_Line;
end Locations;
......@@ -31,10 +31,10 @@
-- --
------------------------------------------------------------------------------
with Output; use Output;
with Ocarina.Output; use Ocarina.Output;
with GNAT.Spelling_Checker;
package body Namet is
package body Ocarina.Namet is
Hash_Num : constant Int := 2**12;
-- Number of headers in the hash table. Current hash algorithm is closely
......@@ -446,7 +446,7 @@ package body Namet is
-- Otherwise search hash table for existing matching entry
else
Hash_Index := Namet.Hash;
Hash_Index := Ocarina.Namet.Hash;
New_Id := Hash_Table (Hash_Index);
if New_Id = No_Name then
......@@ -619,4 +619,4 @@ package body Namet is
end loop;
end Is_Bad_Spelling;
end Namet;
end Ocarina.Namet;
......@@ -35,7 +35,7 @@ with GNAT.Table;
with Types; use Types;
package Namet is
package Ocarina.Namet is
-- This package contains routines for handling the names table. The table
-- is used to store character strings for identifiers and operator symbols,
......@@ -234,4 +234,4 @@ private
Table_Initial => 6_000,
Table_Increment => 100);
end Namet;
end Ocarina.Namet;
......@@ -35,7 +35,7 @@ pragma License (GPL);
with GNAT.OS_Lib; use GNAT.OS_Lib;
package body Output is
package body Ocarina.Output is
Current_FD : File_Descriptor := Standout;
-- File descriptor for current output
......@@ -276,4 +276,4 @@ package body Output is
end loop;
end Write_Str;
end Output;
end Ocarina.Output;
......@@ -39,8 +39,8 @@ with GNAT.OS_Lib;
with Types; use Types;
package Output is
pragma Elaborate_Body (Output);
package Ocarina.Output is
pragma Elaborate_Body (Ocarina.Output);
-----------------
-- Subprograms --
......@@ -102,4 +102,4 @@ package Output is
procedure Write_Indentation (Offset : Integer := 0);
procedure Write_Space;
end Output;
end Ocarina.Output;
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2012 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2014 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 --
......@@ -31,8 +31,8 @@
-- --
------------------------------------------------------------------------------
with Namet; use Namet;
with Output; use Output;
with Ocarina.Namet; use Ocarina.Namet;
with Ocarina.Output; use Ocarina.Output;
package body Outfiles is
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2007-2009 Telecom ParisTech, 2010-2012 ESA & ISAE. --
-- Copyright (C) 2007-2009 Telecom ParisTech, 2010-2014 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 --
......@@ -32,7 +32,7 @@
------------------------------------------------------------------------------
with Charset; use Charset;
with Namet; use Namet;
with Ocarina.Namet; use Ocarina.Namet;
package body Utils is
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2012 ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2014 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 --
......@@ -31,7 +31,7 @@
-- --
------------------------------------------------------------------------------
with Namet;
with Ocarina.Namet;
with Ocarina.ME_AADL.AADL_Tree.Nodes;
with Ocarina.ME_AADL.AADL_Instances.Nodes;
......@@ -41,7 +41,7 @@ with Ocarina.ME_AADL.AADL_Tree.Entities.Properties;
package body Ocarina.Instances.Queries is
use Namet;
use Ocarina.Namet;
use Ocarina.ME_AADL.AADL_Tree.Nodes;
use Ocarina.ME_AADL.AADL_Instances.Nodes;
......
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