aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-05-04 21:59:35 +0200
committerTristan Gingold <tgingold@free.fr>2019-05-04 21:59:35 +0200
commit7ca14ac72c36c363d8f874c266c2730f209a0edd (patch)
treebbb7bd17960299bc03da84c1b37e0e4dafdf31c4
parentfc028b5d21727da66dc8e146b3dbcfc870c64f90 (diff)
downloadghdl-7ca14ac72c36c363d8f874c266c2730f209a0edd.tar.gz
ghdl-7ca14ac72c36c363d8f874c266c2730f209a0edd.tar.bz2
ghdl-7ca14ac72c36c363d8f874c266c2730f209a0edd.zip
vhdl: move tokens as vhdl child package.
-rw-r--r--src/ghdldrv/ghdlprint.adb8
-rw-r--r--src/libraries.adb4
-rw-r--r--src/vhdl/disp_tree.adb4
-rw-r--r--src/vhdl/disp_tree.ads4
-rw-r--r--src/vhdl/disp_vhdl.adb8
-rw-r--r--src/vhdl/errorout.adb4
-rw-r--r--src/vhdl/errorout.ads6
-rw-r--r--src/vhdl/ieee-vital_timing.adb2
-rw-r--r--src/vhdl/iirs.ads2
-rw-r--r--src/vhdl/iirs_utils.adb2
-rw-r--r--src/vhdl/nodes_meta.ads2
-rw-r--r--src/vhdl/nodes_meta.ads.in2
-rw-r--r--src/vhdl/parse.adb2
-rw-r--r--src/vhdl/parse_psl.ads2
-rw-r--r--src/vhdl/sem_decls.adb4
-rw-r--r--src/vhdl/sem_specs.adb12
-rw-r--r--src/vhdl/sem_specs.ads4
-rw-r--r--src/vhdl/simulate/simul-debugger.adb4
-rw-r--r--src/vhdl/vhdl-scanner.ads2
-rw-r--r--src/vhdl/vhdl-tokens.adb (renamed from src/vhdl/tokens.adb)5
-rw-r--r--src/vhdl/vhdl-tokens.ads (renamed from src/vhdl/tokens.ads)9
21 files changed, 47 insertions, 45 deletions
diff --git a/src/ghdldrv/ghdlprint.adb b/src/ghdldrv/ghdlprint.adb
index d72b1747d..a9a9f2627 100644
--- a/src/ghdldrv/ghdlprint.adb
+++ b/src/ghdldrv/ghdlprint.adb
@@ -27,7 +27,7 @@ with Files_Map;
with Libraries;
with Errorout; use Errorout;
with Iirs_Utils; use Iirs_Utils;
-with Tokens;
+with Vhdl.Tokens;
with Vhdl.Scanner;
with Parse;
with Canon;
@@ -86,7 +86,7 @@ package body Ghdlprint is
is
use Flags;
use Vhdl.Scanner;
- use Tokens;
+ use Vhdl.Tokens;
use Files_Map;
use Ada.Characters.Latin_1;
@@ -856,7 +856,7 @@ package body Ghdlprint is
is
pragma Unreferenced (Cmd);
use Vhdl.Scanner;
- use Tokens;
+ use Vhdl.Tokens;
use Files_Map;
use Ada.Characters.Latin_1;
@@ -1047,7 +1047,7 @@ package body Ghdlprint is
Args : Argument_List)
is
pragma Unreferenced (Cmd);
- use Tokens;
+ use Vhdl.Tokens;
use Vhdl.Scanner;
package Ref_Tokens is new Tables
diff --git a/src/libraries.adb b/src/libraries.adb
index ff499717c..bf0d63503 100644
--- a/src/libraries.adb
+++ b/src/libraries.adb
@@ -25,7 +25,7 @@ with Vhdl.Scanner;
with Iirs_Utils; use Iirs_Utils;
with Name_Table; use Name_Table;
with Str_Table;
-with Tokens;
+with Vhdl.Tokens;
with Files_Map;
with Flags;
with Std_Package;
@@ -328,7 +328,7 @@ package body Libraries is
function Load_Library (Library: Iir_Library_Declaration) return Boolean
is
use Vhdl.Scanner;
- use Tokens;
+ use Vhdl.Tokens;
File : Source_File_Entry;
diff --git a/src/vhdl/disp_tree.adb b/src/vhdl/disp_tree.adb
index e39c267f9..d5b1cc8a8 100644
--- a/src/vhdl/disp_tree.adb
+++ b/src/vhdl/disp_tree.adb
@@ -337,8 +337,8 @@ package body Disp_Tree is
end case;
end Image_Iir_Direction;
- function Image_Token_Type (Tok : Tokens.Token_Type) return String
- renames Tokens.Image;
+ function Image_Token_Type (Tok : Vhdl.Tokens.Token_Type) return String
+ renames Vhdl.Tokens.Image;
function Image_String8 (N : Iir) return String
is
diff --git a/src/vhdl/disp_tree.ads b/src/vhdl/disp_tree.ads
index 9c48a0ffc..324094008 100644
--- a/src/vhdl/disp_tree.ads
+++ b/src/vhdl/disp_tree.ads
@@ -17,7 +17,7 @@
-- 02111-1307, USA.
with Types; use Types;
with Iirs; use Iirs;
-with Tokens; use Tokens;
+with Vhdl.Tokens; use Vhdl.Tokens;
package Disp_Tree is
-- Disp TREE recursively.
@@ -48,6 +48,6 @@ package Disp_Tree is
return String;
function Image_Location_Type (Loc : Location_Type) return String;
function Image_Iir_Direction (Dir : Iir_Direction) return String;
- function Image_Token_Type (Tok : Tokens.Token_Type) return String;
+ function Image_Token_Type (Tok : Vhdl.Tokens.Token_Type) return String;
function Image_String8 (N : Iir) return String;
end Disp_Tree;
diff --git a/src/vhdl/disp_vhdl.adb b/src/vhdl/disp_vhdl.adb
index df4b071a5..ea3fc34be 100644
--- a/src/vhdl/disp_vhdl.adb
+++ b/src/vhdl/disp_vhdl.adb
@@ -28,7 +28,7 @@ with Iirs_Utils; use Iirs_Utils;
with Name_Table;
with Str_Table;
with Std_Names;
-with Tokens;
+with Vhdl.Tokens;
with PSL.Nodes;
with PSL.Prints;
with PSL.NFAs;
@@ -1610,9 +1610,9 @@ package body Disp_Vhdl is
Disp_Ident (Get_Identifier (Attr));
end Disp_Attribute_Name;
- procedure Disp_Entity_Kind (Tok : Tokens.Token_Type) is
+ procedure Disp_Entity_Kind (Tok : Vhdl.Tokens.Token_Type) is
begin
- Put (Tokens.Image (Tok));
+ Put (Vhdl.Tokens.Image (Tok));
end Disp_Entity_Kind;
procedure Disp_Entity_Name_List (List : Iir_Flist)
@@ -1667,7 +1667,7 @@ package body Disp_Vhdl is
procedure Disp_Group_Template_Declaration (Decl : Iir)
is
- use Tokens;
+ use Vhdl.Tokens;
Ent : Iir;
begin
Put ("group ");
diff --git a/src/vhdl/errorout.adb b/src/vhdl/errorout.adb
index fb6211ce4..cc292b4b2 100644
--- a/src/vhdl/errorout.adb
+++ b/src/vhdl/errorout.adb
@@ -147,7 +147,7 @@ package body Errorout is
return (Kind => Earg_Id, Val_Id => V);
end "+";
- function "+" (V : Tokens.Token_Type) return Earg_Type is
+ function "+" (V : Vhdl.Tokens.Token_Type) return Earg_Type is
begin
return (Kind => Earg_Token, Val_Tok => V);
end "+";
@@ -330,7 +330,7 @@ package body Errorout is
when 't' =>
-- A token
declare
- use Tokens;
+ use Vhdl.Tokens;
Arg : Earg_Type renames Args (Argn);
Tok : Token_Type;
begin
diff --git a/src/vhdl/errorout.ads b/src/vhdl/errorout.ads
index 9b802c0c2..0df0e6fbc 100644
--- a/src/vhdl/errorout.ads
+++ b/src/vhdl/errorout.ads
@@ -17,7 +17,7 @@
-- 02111-1307, USA.
with Types; use Types;
with Iirs; use Iirs;
-with Tokens;
+with Vhdl.Tokens;
package Errorout is
Option_Error: exception;
@@ -166,7 +166,7 @@ package Errorout is
function "+" (V : Iir) return Earg_Type;
function "+" (V : Location_Type) return Earg_Type;
function "+" (V : Name_Id) return Earg_Type;
- function "+" (V : Tokens.Token_Type) return Earg_Type;
+ function "+" (V : Vhdl.Tokens.Token_Type) return Earg_Type;
function "+" (V : Character) return Earg_Type;
function "+" (V : String8_Len_Type) return Earg_Type;
@@ -346,7 +346,7 @@ private
when Earg_Char =>
Val_Char : Character;
when Earg_Token =>
- Val_Tok : Tokens.Token_Type;
+ Val_Tok : Vhdl.Tokens.Token_Type;
when Earg_String8 =>
Val_Str8 : String8_Len_Type;
end case;
diff --git a/src/vhdl/ieee-vital_timing.adb b/src/vhdl/ieee-vital_timing.adb
index fc3f26349..ee60bbd15 100644
--- a/src/vhdl/ieee-vital_timing.adb
+++ b/src/vhdl/ieee-vital_timing.adb
@@ -19,7 +19,7 @@ with Types; use Types;
with Std_Names;
with Errorout; use Errorout;
with Std_Package; use Std_Package;
-with Tokens; use Tokens;
+with Vhdl.Tokens; use Vhdl.Tokens;
with Name_Table;
with Ieee.Std_Logic_1164; use Ieee.Std_Logic_1164;
with Sem_Scopes;
diff --git a/src/vhdl/iirs.ads b/src/vhdl/iirs.ads
index 04e410815..e1226db1f 100644
--- a/src/vhdl/iirs.ads
+++ b/src/vhdl/iirs.ads
@@ -17,7 +17,7 @@
-- 02111-1307, USA.
with Ada.Unchecked_Deallocation;
with Types; use Types;
-with Tokens; use Tokens;
+with Vhdl.Tokens; use Vhdl.Tokens;
with Nodes;
with Lists;
with Flists;
diff --git a/src/vhdl/iirs_utils.adb b/src/vhdl/iirs_utils.adb
index 3ea7aed3c..034fdd051 100644
--- a/src/vhdl/iirs_utils.adb
+++ b/src/vhdl/iirs_utils.adb
@@ -16,7 +16,7 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
with Vhdl.Scanner; use Vhdl.Scanner;
-with Tokens; use Tokens;
+with Vhdl.Tokens; use Vhdl.Tokens;
with Errorout; use Errorout;
with Name_Table;
with Str_Table;
diff --git a/src/vhdl/nodes_meta.ads b/src/vhdl/nodes_meta.ads
index 4f913b7c1..e3a0113ca 100644
--- a/src/vhdl/nodes_meta.ads
+++ b/src/vhdl/nodes_meta.ads
@@ -18,7 +18,7 @@
with Types; use Types;
with Iirs; use Iirs;
-with Tokens; use Tokens;
+with Vhdl.Tokens; use Vhdl.Tokens;
package Nodes_Meta is
-- The enumeration of all possible types in the nodes.
diff --git a/src/vhdl/nodes_meta.ads.in b/src/vhdl/nodes_meta.ads.in
index 18e7dca29..d48c9ec07 100644
--- a/src/vhdl/nodes_meta.ads.in
+++ b/src/vhdl/nodes_meta.ads.in
@@ -18,7 +18,7 @@
with Types; use Types;
with Iirs; use Iirs;
-with Tokens; use Tokens;
+with Vhdl.Tokens; use Vhdl.Tokens;
package Nodes_Meta is
-- The enumeration of all possible types in the nodes.
diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb
index d4e8b6121..a5875e5c5 100644
--- a/src/vhdl/parse.adb
+++ b/src/vhdl/parse.adb
@@ -16,7 +16,7 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
with Iir_Chains; use Iir_Chains;
-with Tokens; use Tokens;
+with Vhdl.Tokens; use Vhdl.Tokens;
with Vhdl.Scanner; use Vhdl.Scanner;
with Iirs_Utils; use Iirs_Utils;
with Errorout; use Errorout;
diff --git a/src/vhdl/parse_psl.ads b/src/vhdl/parse_psl.ads
index 1df993e82..c24e65091 100644
--- a/src/vhdl/parse_psl.ads
+++ b/src/vhdl/parse_psl.ads
@@ -17,7 +17,7 @@
-- 02111-1307, USA.
with Types; use Types;
-with Tokens; use Tokens;
+with Vhdl.Tokens; use Vhdl.Tokens;
package Parse_Psl is
function Parse_Psl_Sequence (Full_Hdl_Expr : Boolean) return PSL_Node;
diff --git a/src/vhdl/sem_decls.adb b/src/vhdl/sem_decls.adb
index 6363acc98..6e1a745c0 100644
--- a/src/vhdl/sem_decls.adb
+++ b/src/vhdl/sem_decls.adb
@@ -18,7 +18,7 @@
with Errorout; use Errorout;
with Types; use Types;
with Std_Names;
-with Tokens;
+with Vhdl.Tokens;
with Flags; use Flags;
with Std_Package; use Std_Package;
with Evaluation; use Evaluation;
@@ -1790,7 +1790,7 @@ package body Sem_Decls is
procedure Sem_Group_Declaration (Group : Iir_Group_Declaration)
is
- use Tokens;
+ use Vhdl.Tokens;
Constituent_List : Iir_Flist;
Template : Iir_Group_Template_Declaration;
diff --git a/src/vhdl/sem_specs.adb b/src/vhdl/sem_specs.adb
index e1584d904..429431539 100644
--- a/src/vhdl/sem_specs.adb
+++ b/src/vhdl/sem_specs.adb
@@ -34,9 +34,9 @@ with Xrefs; use Xrefs;
with Back_End;
package body Sem_Specs is
- function Get_Entity_Class_Kind (Decl : Iir) return Tokens.Token_Type
+ function Get_Entity_Class_Kind (Decl : Iir) return Vhdl.Tokens.Token_Type
is
- use Tokens;
+ use Vhdl.Tokens;
begin
case Get_Kind (Decl) is
when Iir_Kind_Entity_Declaration =>
@@ -186,7 +186,7 @@ package body Sem_Specs is
Check_Class : Boolean;
Check_Defined : Boolean)
is
- use Tokens;
+ use Vhdl.Tokens;
Attr_Expr : constant Iir := Get_Expression (Attr);
El : Iir_Attribute_Value;
@@ -380,7 +380,7 @@ package body Sem_Specs is
-- Note: ENT and DECL are different for aliases.
function Sem_Named_Entity1 (Ent : Iir; Decl : Iir) return Boolean
is
- use Tokens;
+ use Vhdl.Tokens;
Ent_Id : constant Name_Id := Get_Identifier (Ent);
begin
if (not Is_Designator or else Ent_Id = Get_Identifier (Name))
@@ -738,7 +738,7 @@ package body Sem_Specs is
(+Name, "no %i for attribute specification", (1 => +Name));
end Error_Attribute_Specification;
- use Tokens;
+ use Vhdl.Tokens;
Name : Iir;
Attr : Iir_Attribute_Declaration;
@@ -877,7 +877,7 @@ package body Sem_Specs is
procedure Check_Post_Attribute_Specification
(Attr_Spec_Chain : Iir; Decl : Iir)
is
- use Tokens;
+ use Vhdl.Tokens;
Has_Error : Boolean;
Spec : Iir;
diff --git a/src/vhdl/sem_specs.ads b/src/vhdl/sem_specs.ads
index 50049e671..170df72fb 100644
--- a/src/vhdl/sem_specs.ads
+++ b/src/vhdl/sem_specs.ads
@@ -17,7 +17,7 @@
-- 02111-1307, USA.
with Types; use Types;
with Iirs; use Iirs;
-with Tokens;
+with Vhdl.Tokens;
package Sem_Specs is
-- Return the attribute_value for named entity ENT and attribute identifier
@@ -29,7 +29,7 @@ package Sem_Specs is
-- is also the parent of the declaration, but there are exceptions...
function Get_Attribute_Value_Chain_Parent (Decl : Iir) return Iir;
- function Get_Entity_Class_Kind (Decl : Iir) return Tokens.Token_Type;
+ function Get_Entity_Class_Kind (Decl : Iir) return Vhdl.Tokens.Token_Type;
procedure Sem_Attribute_Specification
(Spec : Iir_Attribute_Specification; Scope : Iir);
diff --git a/src/vhdl/simulate/simul-debugger.adb b/src/vhdl/simulate/simul-debugger.adb
index 3e868a44a..c257b909d 100644
--- a/src/vhdl/simulate/simul-debugger.adb
+++ b/src/vhdl/simulate/simul-debugger.adb
@@ -25,7 +25,7 @@ with Str_Table;
with Files_Map;
with Parse;
with Vhdl.Scanner;
-with Tokens;
+with Vhdl.Tokens;
with Sem_Expr;
with Sem_Scopes;
with Canon;
@@ -1869,7 +1869,7 @@ package body Simul.Debugger is
procedure Print_Proc (Line : String)
is
- use Tokens;
+ use Vhdl.Tokens;
Index_Str : String := Natural'Image (Buffer_Index);
File : Source_File_Entry;
Expr : Iir;
diff --git a/src/vhdl/vhdl-scanner.ads b/src/vhdl/vhdl-scanner.ads
index 221defd91..797e2f6e1 100644
--- a/src/vhdl/vhdl-scanner.ads
+++ b/src/vhdl/vhdl-scanner.ads
@@ -16,7 +16,7 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
with Types; use Types;
-with Tokens; use Tokens;
+with Vhdl.Tokens; use Vhdl.Tokens;
package Vhdl.Scanner is
-- Global variables
diff --git a/src/vhdl/tokens.adb b/src/vhdl/vhdl-tokens.adb
index a46edf017..fc32c475c 100644
--- a/src/vhdl/tokens.adb
+++ b/src/vhdl/vhdl-tokens.adb
@@ -15,7 +15,8 @@
-- along with GHDL; see the file COPYING. If not, write to the Free
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
-package body Tokens is
+
+package body Vhdl.Tokens is
-- Return the name of the token.
function Image (Token: Token_Type) return String is
begin
@@ -452,4 +453,4 @@ package body Tokens is
end case;
end Image;
-end Tokens;
+end Vhdl.Tokens;
diff --git a/src/vhdl/tokens.ads b/src/vhdl/vhdl-tokens.ads
index 16cccb572..b18735859 100644
--- a/src/vhdl/tokens.ads
+++ b/src/vhdl/vhdl-tokens.ads
@@ -1,5 +1,5 @@
-- Scanner token definitions.
--- Copyright (C) 2002, 2003, 2004, 2005 Tristan Gingold
+-- Copyright (C) 2002-2019 Tristan Gingold
--
-- GHDL is free software; you can redistribute it and/or modify it under
-- the terms of the GNU General Public License as published by the Free
@@ -15,8 +15,9 @@
-- along with GHDL; see the file COPYING. If not, write to the Free
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
-package Tokens is
- pragma Pure (Tokens);
+
+package Vhdl.Tokens is
+ pragma Pure (Vhdl.Tokens);
type Token_Type is
(
@@ -299,4 +300,4 @@ package Tokens is
-- Return the name of the token.
function Image (Token: Token_Type) return String;
-end Tokens;
+end Vhdl.Tokens;