aboutsummaryrefslogtreecommitdiffstats
path: root/src/psl
diff options
context:
space:
mode:
Diffstat (limited to 'src/psl')
-rw-r--r--src/psl/psl-build.adb1
-rw-r--r--src/psl/psl-cse.adb1
-rw-r--r--src/psl/psl-dump_tree.adb1
-rw-r--r--src/psl/psl-errors.ads1
-rw-r--r--src/psl/psl-hash.adb1
-rw-r--r--src/psl/psl-nfas-utils.adb4
-rw-r--r--src/psl/psl-nfas.adb1
-rw-r--r--src/psl/psl-nodes.ads3
-rw-r--r--src/psl/psl-nodes_priv.ads26
-rw-r--r--src/psl/psl-optimize.adb1
-rw-r--r--src/psl/psl-prints.adb1
-rw-r--r--src/psl/psl-qm.adb1
-rw-r--r--src/psl/psl-rewrites.adb1
-rw-r--r--src/psl/psl-subsets.adb2
-rw-r--r--src/psl/psl-types.ads30
15 files changed, 72 insertions, 3 deletions
diff --git a/src/psl/psl-build.adb b/src/psl/psl-build.adb
index 7a047b6de..5c317d711 100644
--- a/src/psl/psl-build.adb
+++ b/src/psl/psl-build.adb
@@ -19,6 +19,7 @@
with Tables;
with Ada.Text_IO; use Ada.Text_IO;
with Types; use Types;
+with PSL.Types; use PSL.Types;
with PSL.Errors; use PSL.Errors;
with PSL.CSE; use PSL.CSE;
with PSL.QM;
diff --git a/src/psl/psl-cse.adb b/src/psl/psl-cse.adb
index ed4fc7282..93cd85452 100644
--- a/src/psl/psl-cse.adb
+++ b/src/psl/psl-cse.adb
@@ -17,6 +17,7 @@
-- 02111-1307, USA.
with Ada.Text_IO;
+with PSL.Types; use PSL.Types;
with PSL.Prints;
with Types; use Types;
diff --git a/src/psl/psl-dump_tree.adb b/src/psl/psl-dump_tree.adb
index 700c120d3..f04333b51 100644
--- a/src/psl/psl-dump_tree.adb
+++ b/src/psl/psl-dump_tree.adb
@@ -19,6 +19,7 @@
with Ada.Text_IO; use Ada.Text_IO;
with Types; use Types;
with Name_Table;
+with PSL.Types; use PSL.Types;
with PSL.Errors;
with PSL.Nodes_Meta;
diff --git a/src/psl/psl-errors.ads b/src/psl/psl-errors.ads
index b4b88d1da..bbc571624 100644
--- a/src/psl/psl-errors.ads
+++ b/src/psl/psl-errors.ads
@@ -17,6 +17,7 @@
-- 02111-1307, USA.
with Types; use Types;
with Files_Map;
+with PSL.Types; use PSL.Types;
package PSL.Errors is
function Image (Loc : Location_Type; Filename : Boolean := True)
diff --git a/src/psl/psl-hash.adb b/src/psl/psl-hash.adb
index 3333066bb..b2bdccc79 100644
--- a/src/psl/psl-hash.adb
+++ b/src/psl/psl-hash.adb
@@ -17,6 +17,7 @@
-- 02111-1307, USA.
with Tables;
+with PSL.Types; use PSL.Types;
package body PSL.Hash is
diff --git a/src/psl/psl-nfas-utils.adb b/src/psl/psl-nfas-utils.adb
index 152cd752e..16c0ac6d5 100644
--- a/src/psl/psl-nfas-utils.adb
+++ b/src/psl/psl-nfas-utils.adb
@@ -16,6 +16,8 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
+with PSL.Types; use PSL.Types;
+with PSL.Nodes_Priv;
with PSL.Errors; use PSL.Errors;
package body PSL.NFAs.Utils is
@@ -45,7 +47,7 @@ package body PSL.NFAs.Utils is
L_Expr : constant Node := Get_Edge_Expr (L);
R_Expr : constant Node := Get_Edge_Expr (R);
begin
- return L_Expr < R_Expr
+ return PSL.Nodes_Priv."<" (L_Expr, R_Expr)
or else (L_Expr = R_Expr
and then Get_Edge_State (L) < Get_Edge_State (R));
end Lt;
diff --git a/src/psl/psl-nfas.adb b/src/psl/psl-nfas.adb
index 0a4348901..1e3f55ba7 100644
--- a/src/psl/psl-nfas.adb
+++ b/src/psl/psl-nfas.adb
@@ -17,6 +17,7 @@
-- 02111-1307, USA.
with Tables;
+with PSL.Types; use PSL.Types;
package body PSL.NFAs is
-- Record that describes an NFA.
diff --git a/src/psl/psl-nodes.ads b/src/psl/psl-nodes.ads
index b3887a075..ec3022c35 100644
--- a/src/psl/psl-nodes.ads
+++ b/src/psl/psl-nodes.ads
@@ -17,6 +17,7 @@
-- 02111-1307, USA.
with Types; use Types;
+with PSL.Types; use PSL.Types;
package PSL.Nodes is
type Nkind is
@@ -425,7 +426,7 @@ package PSL.Nodes is
subtype NFA is Types.PSL_NFA;
- subtype HDL_Node is Types.Int32;
+ subtype HDL_Node is Int32;
HDL_Null : constant HDL_Node := 0;
-- General methods.
diff --git a/src/psl/psl-nodes_priv.ads b/src/psl/psl-nodes_priv.ads
new file mode 100644
index 000000000..5c0bf51d0
--- /dev/null
+++ b/src/psl/psl-nodes_priv.ads
@@ -0,0 +1,26 @@
+-- Base types for PSL.
+-- Copyright (C) 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;
+
+package PSL.Nodes_Priv is
+ -- PSL Node.
+ type PSL_Node is new Int32;
+
+ -- PSL NFA
+ type PSL_NFA is new Int32;
+end PSL.Nodes_Priv;
diff --git a/src/psl/psl-optimize.adb b/src/psl/psl-optimize.adb
index 9ff9b1af7..a9391d5ae 100644
--- a/src/psl/psl-optimize.adb
+++ b/src/psl/psl-optimize.adb
@@ -17,6 +17,7 @@
-- 02111-1307, USA.
with Types; use Types;
+with PSL.Types; use PSL.Types;
with PSL.NFAs.Utils; use PSL.NFAs.Utils;
with PSL.CSE;
diff --git a/src/psl/psl-prints.adb b/src/psl/psl-prints.adb
index dd0755570..9bc05d940 100644
--- a/src/psl/psl-prints.adb
+++ b/src/psl/psl-prints.adb
@@ -17,6 +17,7 @@
-- 02111-1307, USA.
with Types; use Types;
+with PSL.Types; use PSL.Types;
with PSL.Errors; use PSL.Errors;
with Name_Table; use Name_Table;
with Ada.Text_IO; use Ada.Text_IO;
diff --git a/src/psl/psl-qm.adb b/src/psl/psl-qm.adb
index 719329b8f..41f8e1001 100644
--- a/src/psl/psl-qm.adb
+++ b/src/psl/psl-qm.adb
@@ -18,6 +18,7 @@
with Ada.Text_IO;
with Types; use Types;
+with PSL.Types; use PSL.Types;
with PSL.Errors; use PSL.Errors;
with PSL.Prints;
with PSL.CSE;
diff --git a/src/psl/psl-rewrites.adb b/src/psl/psl-rewrites.adb
index b575b3015..e06ddd323 100644
--- a/src/psl/psl-rewrites.adb
+++ b/src/psl/psl-rewrites.adb
@@ -1,4 +1,5 @@
with Types; use Types;
+with PSL.Types; use PSL.Types;
with PSL.Errors; use PSL.Errors;
with PSL.CSE; use PSL.CSE;
diff --git a/src/psl/psl-subsets.adb b/src/psl/psl-subsets.adb
index 520cc32ff..8aaf2b063 100644
--- a/src/psl/psl-subsets.adb
+++ b/src/psl/psl-subsets.adb
@@ -16,8 +16,8 @@
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
+with PSL.Types; use PSL.Types;
with PSL.Errors; use PSL.Errors;
-with Types; use Types;
package body PSL.Subsets is
procedure Check_Simple (N : Node)
diff --git a/src/psl/psl-types.ads b/src/psl/psl-types.ads
new file mode 100644
index 000000000..e6e3c700a
--- /dev/null
+++ b/src/psl/psl-types.ads
@@ -0,0 +1,30 @@
+-- Base types for PSL.
+-- Copyright (C) 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 PSL.Nodes_Priv;
+
+package PSL.Types is
+ -- PSL Node.
+ subtype PSL_Node is PSL.Nodes_Priv.PSL_Node;
+ function "=" (L, R : PSL_Node) return Boolean
+ renames PSL.Nodes_Priv."=";
+
+ -- PSL NFA
+ subtype PSL_NFA is PSL.Nodes_Priv.PSL_NFA;
+ function "=" (L, R : PSL_NFA) return Boolean
+ renames PSL.Nodes_Priv."=";
+end PSL.Types;