aboutsummaryrefslogtreecommitdiffstats
path: root/src/psl/psl-nfas.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-10-21 20:09:18 +0200
committerTristan Gingold <tgingold@free.fr>2019-10-21 20:09:18 +0200
commit9c4519e0c72187f95b6a91e95564ee6a1f45efc7 (patch)
tree7f83d02ac45203ddb990a3b33346f791be2a13f8 /src/psl/psl-nfas.adb
parent92c75a0cbf315abe01b25b60f064941b3fadd80a (diff)
downloadghdl-9c4519e0c72187f95b6a91e95564ee6a1f45efc7.tar.gz
ghdl-9c4519e0c72187f95b6a91e95564ee6a1f45efc7.tar.bz2
ghdl-9c4519e0c72187f95b6a91e95564ee6a1f45efc7.zip
psl: add active state.
Diffstat (limited to 'src/psl/psl-nfas.adb')
-rw-r--r--src/psl/psl-nfas.adb14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/psl/psl-nfas.adb b/src/psl/psl-nfas.adb
index 1e3f55ba7..5327f993a 100644
--- a/src/psl/psl-nfas.adb
+++ b/src/psl/psl-nfas.adb
@@ -30,6 +30,8 @@ package body PSL.NFAs is
Start : NFA_State;
Final : NFA_State;
+ Active : NFA_State;
+
-- If true there is an epsilon transition between the start and
-- the final state.
Epsilon : Boolean;
@@ -208,7 +210,7 @@ package body PSL.NFAs is
-- Fill it.
Nfat.Table (Res) := (First_State => No_State,
Last_State => No_State,
- Start => No_State, Final => No_State,
+ Start | Final | Active => No_State,
Epsilon => False);
return Res;
end Create_NFA;
@@ -315,6 +317,16 @@ package body PSL.NFAs is
Nfat.Table (N).Final := S;
end Set_Final_State;
+ function Get_Active_State (N : NFA) return NFA_State is
+ begin
+ return Nfat.Table (N).Active;
+ end Get_Active_State;
+
+ procedure Set_Active_State (N : NFA; S : NFA_State) is
+ begin
+ Nfat.Table (N).Active := S;
+ end Set_Active_State;
+
function Get_Next_Src_Edge (N : NFA_Edge) return NFA_Edge is
begin
return Transt.Table (N).Next_Src;