diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/errorout.adb | 9 | ||||
-rw-r--r-- | src/errorout.ads | 4 | ||||
-rw-r--r-- | src/psl/psl-errors.adb | 35 | ||||
-rw-r--r-- | src/psl/psl-errors.ads | 29 | ||||
-rw-r--r-- | src/vhdl/psl-errors.ads | 15 | ||||
-rw-r--r-- | src/vhdl/simulate/simul-simulation-main.adb | 2 | ||||
-rw-r--r-- | src/vhdl/translate/trans-chap9.adb | 2 | ||||
-rw-r--r-- | src/vhdl/vhdl-canon.adb | 3 | ||||
-rw-r--r-- | src/vhdl/vhdl-disp_vhdl.adb | 4 | ||||
-rw-r--r-- | src/vhdl/vhdl-errors.adb | 5 | ||||
-rw-r--r-- | src/vhdl/vhdl-errors.ads | 1 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_psl.adb | 1 |
12 files changed, 71 insertions, 39 deletions
diff --git a/src/errorout.adb b/src/errorout.adb index 1b022391d..d921a9040 100644 --- a/src/errorout.adb +++ b/src/errorout.adb @@ -16,7 +16,6 @@ -- Software Foundation, 59 Temple Place - Suite 330, Boston, MA -- 02111-1307, USA. -with Logging; use Logging; with Vhdl.Scanner; with Name_Table; with Files_Map; use Files_Map; @@ -27,14 +26,6 @@ with Str_Table; with Vhdl.Errors; use Vhdl.Errors; package body Errorout is - procedure Error_Kind (Msg : String; N : PSL_Node) is - begin - Log (Msg); - Log (": cannot handle "); - Log_Line (PSL.Nodes.Nkind'Image (PSL.Nodes.Get_Kind (N))); - raise Internal_Error; - end Error_Kind; - function Natural_Image (Val: Natural) return String is Str: constant String := Natural'Image (Val); diff --git a/src/errorout.ads b/src/errorout.ads index 1abacca3a..66c2469ca 100644 --- a/src/errorout.ads +++ b/src/errorout.ads @@ -23,10 +23,6 @@ package Errorout is Option_Error: exception; Compilation_Error: exception; - -- This kind can't be handled. - procedure Error_Kind (Msg : String; N : PSL_Node); - pragma No_Return (Error_Kind); - -- The number of errors (ie, number of calls to error_msg*). Nbr_Errors : Natural := 0; diff --git a/src/psl/psl-errors.adb b/src/psl/psl-errors.adb new file mode 100644 index 000000000..a71b18e86 --- /dev/null +++ b/src/psl/psl-errors.adb @@ -0,0 +1,35 @@ +-- Error message handling for PSL. +-- 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 +-- Software Foundation; either version 2, or (at your option) any later +-- version. +-- +-- GHDL is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or +-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +-- for more details. +-- +-- You should have received a copy of the GNU General Public License +-- 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. +with Logging; use Logging; +with Errorout; use Errorout; +with PSL.Nodes; + +package body PSL.Errors is + procedure Error_Kind (Msg : String; N : PSL_Node) is + begin + Log (Msg); + Log (": cannot handle "); + Log_Line (PSL.Nodes.Nkind'Image (PSL.Nodes.Get_Kind (N))); + raise Internal_Error; + end Error_Kind; + + procedure Error_Msg_Sem (Msg: String; Loc : PSL_Node) is + begin + Report_Msg (Msgid_Error, Semantic, +Loc, Msg, No_Eargs, False); + end Error_Msg_Sem; +end PSL.Errors; diff --git a/src/psl/psl-errors.ads b/src/psl/psl-errors.ads new file mode 100644 index 000000000..b4b88d1da --- /dev/null +++ b/src/psl/psl-errors.ads @@ -0,0 +1,29 @@ +-- Error message handling for PSL. +-- 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 +-- Software Foundation; either version 2, or (at your option) any later +-- version. +-- +-- GHDL is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or +-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +-- for more details. +-- +-- You should have received a copy of the GNU General Public License +-- 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. +with Types; use Types; +with Files_Map; + +package PSL.Errors is + function Image (Loc : Location_Type; Filename : Boolean := True) + return String renames Files_Map.Image; + + procedure Error_Kind (Msg : String; N : PSL_Node); + pragma No_Return (Error_Kind); + + procedure Error_Msg_Sem (Msg: String; Loc: PSL_Node); +end PSL.Errors; diff --git a/src/vhdl/psl-errors.ads b/src/vhdl/psl-errors.ads deleted file mode 100644 index 4d33faa51..000000000 --- a/src/vhdl/psl-errors.ads +++ /dev/null @@ -1,15 +0,0 @@ -with Types; use Types; -with Errorout; use Errorout; -with Vhdl.Errors; use Vhdl.Errors; -with Files_Map; - -package PSL.Errors is - function Image (Loc : Location_Type; Filename : Boolean := True) - return String renames Files_Map.Image; - - procedure Error_Kind (Msg : String; N : PSL_Node) renames - Errorout.Error_Kind; - - procedure Error_Msg_Sem (Msg: String; Loc: PSL_Node) - renames Vhdl.Errors.Error_Msg_Sem_1; -end PSL.Errors; diff --git a/src/vhdl/simulate/simul-simulation-main.adb b/src/vhdl/simulate/simul-simulation-main.adb index 8a91ed179..3a9f5d5ce 100644 --- a/src/vhdl/simulate/simul-simulation-main.adb +++ b/src/vhdl/simulate/simul-simulation-main.adb @@ -20,11 +20,11 @@ with Ada.Unchecked_Conversion; with Ada.Text_IO; use Ada.Text_IO; with Types; use Types; with Vhdl.Utils; use Vhdl.Utils; -with Errorout; use Errorout; with Vhdl.Errors; use Vhdl.Errors; with PSL.Nodes; with PSL.NFAs; with PSL.NFAs.Utils; +with PSL.Errors; use PSL.Errors; with Vhdl.Std_Package; with Trans_Analyzes; with Simul.Elaboration; use Simul.Elaboration; diff --git a/src/vhdl/translate/trans-chap9.adb b/src/vhdl/translate/trans-chap9.adb index 0ff2d31d0..58e0d6dcb 100644 --- a/src/vhdl/translate/trans-chap9.adb +++ b/src/vhdl/translate/trans-chap9.adb @@ -17,7 +17,6 @@ -- 02111-1307, USA. with Vhdl.Utils; use Vhdl.Utils; -with Errorout; use Errorout; with Vhdl.Errors; use Vhdl.Errors; with Vhdl.Std_Package; use Vhdl.Std_Package; with Flags; @@ -28,6 +27,7 @@ with Vhdl.Nodes_Meta; with PSL.Nodes; with PSL.NFAs; with PSL.NFAs.Utils; +with PSL.Errors; use PSL.Errors; with Vhdl.Ieee.Std_Logic_1164; with Trans.Chap1; with Trans.Chap3; diff --git a/src/vhdl/vhdl-canon.adb b/src/vhdl/vhdl-canon.adb index 29b52c798..b4f46769b 100644 --- a/src/vhdl/vhdl-canon.adb +++ b/src/vhdl/vhdl-canon.adb @@ -15,7 +15,7 @@ -- 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. -with Errorout; use Errorout; + with Vhdl.Errors; use Vhdl.Errors; with Vhdl.Utils; use Vhdl.Utils; with Types; use Types; @@ -30,6 +30,7 @@ with PSL.Rewrites; with PSL.Build; with PSL.NFAs; with PSL.NFAs.Utils; +with PSL.Errors; use PSL.Errors; with Vhdl.Canon_PSL; package body Vhdl.Canon is diff --git a/src/vhdl/vhdl-disp_vhdl.adb b/src/vhdl/vhdl-disp_vhdl.adb index 464e003f1..f54d06788 100644 --- a/src/vhdl/vhdl-disp_vhdl.adb +++ b/src/vhdl/vhdl-disp_vhdl.adb @@ -23,7 +23,6 @@ with GNAT.OS_Lib; with Vhdl.Std_Package; with Flags; use Flags; -with Errorout; use Errorout; with Vhdl.Errors; use Vhdl.Errors; with Vhdl.Utils; use Vhdl.Utils; with Name_Table; @@ -33,6 +32,7 @@ with Vhdl.Tokens; with PSL.Nodes; with PSL.Prints; with PSL.NFAs; +with PSL.Errors; package body Vhdl.Disp_Vhdl is @@ -1766,7 +1766,7 @@ package body Vhdl.Disp_Vhdl is Put_Line (";"); Disp_PSL_NFA (Get_PSL_NFA (Stmt)); when others => - Error_Kind ("disp_psl_declaration", Decl); + PSL.Errors.Error_Kind ("disp_psl_declaration", Decl); end case; end Disp_Psl_Declaration; diff --git a/src/vhdl/vhdl-errors.adb b/src/vhdl/vhdl-errors.adb index 18ed5d4f8..ac38f006e 100644 --- a/src/vhdl/vhdl-errors.adb +++ b/src/vhdl/vhdl-errors.adb @@ -111,11 +111,6 @@ package body Vhdl.Errors is Report_Msg (Msgid_Error, Semantic, Loc, Msg, (1 => Arg1)); end Error_Msg_Sem; - procedure Error_Msg_Sem_1 (Msg: String; Loc : PSL_Node) is - begin - Error_Msg_Sem (+Loc, Msg); - end Error_Msg_Sem_1; - procedure Error_Msg_Relaxed (Origin : Report_Origin; Id : Msgid_Warnings; Msg : String; diff --git a/src/vhdl/vhdl-errors.ads b/src/vhdl/vhdl-errors.ads index 0b44c2795..5987a6782 100644 --- a/src/vhdl/vhdl-errors.ads +++ b/src/vhdl/vhdl-errors.ads @@ -53,7 +53,6 @@ package Vhdl.Errors is Cont : Boolean := False); procedure Error_Msg_Sem (Loc: Location_Type; Msg: String; Arg1 : Earg_Type); - procedure Error_Msg_Sem_1 (Msg: String; Loc : PSL_Node); -- Like Error_Msg_Sem, but a warning if -frelaxed or --std=93c. procedure Error_Msg_Sem_Relaxed (Loc : Iir; diff --git a/src/vhdl/vhdl-sem_psl.adb b/src/vhdl/vhdl-sem_psl.adb index 4cf369d58..6bb25e347 100644 --- a/src/vhdl/vhdl-sem_psl.adb +++ b/src/vhdl/vhdl-sem_psl.adb @@ -20,6 +20,7 @@ with Types; use Types; with PSL.Nodes; use PSL.Nodes; with PSL.Subsets; with PSL.Hash; +with PSL.Errors; use PSL.Errors; with Vhdl.Sem_Expr; with Vhdl.Sem_Stmts; use Vhdl.Sem_Stmts; |