aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-prints.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-01-31 18:50:49 +0100
committerTristan Gingold <tgingold@free.fr>2023-01-31 20:27:00 +0100
commiteaf29d1c2491419a0e9b51e2866c329f60892613 (patch)
treefd8da0037c51ce7facf195766373e60c01ed3909 /src/vhdl/vhdl-prints.adb
parentcfab39c22b2ab2cf26bbeb3af2e68c22fb220ef3 (diff)
downloadghdl-eaf29d1c2491419a0e9b51e2866c329f60892613.tar.gz
ghdl-eaf29d1c2491419a0e9b51e2866c329f60892613.tar.bz2
ghdl-eaf29d1c2491419a0e9b51e2866c329f60892613.zip
vhdl-prints: minor rewrite
Diffstat (limited to 'src/vhdl/vhdl-prints.adb')
-rw-r--r--src/vhdl/vhdl-prints.adb64
1 files changed, 33 insertions, 31 deletions
diff --git a/src/vhdl/vhdl-prints.adb b/src/vhdl/vhdl-prints.adb
index 28e0946e1..c1accef24 100644
--- a/src/vhdl/vhdl-prints.adb
+++ b/src/vhdl/vhdl-prints.adb
@@ -4075,39 +4075,41 @@ package body Vhdl.Prints is
S : NFA_State;
E : NFA_Edge;
begin
- if N /= No_NFA then
- OOB.Put ("-- start: ");
- Disp_State (Get_Start_State (N));
- OOB.Put (", final: ");
- Disp_State (Get_Final_State (N));
- OOB.Put (", active: ");
- S := Get_Active_State (N);
- if S = No_State then
- OOB.Put ("-");
- else
+ if N = No_NFA then
+ return;
+ end if;
+
+ OOB.Put ("-- start: ");
+ Disp_State (Get_Start_State (N));
+ OOB.Put (", final: ");
+ Disp_State (Get_Final_State (N));
+ OOB.Put (", active: ");
+ S := Get_Active_State (N);
+ if S = No_State then
+ OOB.Put ("-");
+ else
+ Disp_State (S);
+ end if;
+ if Get_Epsilon_NFA (N) then
+ OOB.Put (", epsilon");
+ end if;
+ OOB.New_Line;
+
+ S := Get_First_State (N);
+ while S /= No_State loop
+ E := Get_First_Src_Edge (S);
+ while E /= No_Edge loop
+ OOB.Put ("-- ");
Disp_State (S);
- end if;
- if Get_Epsilon_NFA (N) then
- OOB.Put (", epsilon");
- end if;
- OOB.New_Line;
-
- S := Get_First_State (N);
- while S /= No_State loop
- E := Get_First_Src_Edge (S);
- while E /= No_Edge loop
- OOB.Put ("-- ");
- Disp_State (S);
- OOB.Put (" -> ");
- Disp_State (Get_Edge_Dest (E));
- Disp_Token (Ctxt, Tok_Colon); -- To display ": "
- Disp_Psl_Expression (Ctxt, Get_Edge_Expr (E));
- OOB.New_Line;
- E := Get_Next_Src_Edge (E);
- end loop;
- S := Get_Next_State (S);
+ OOB.Put (" -> ");
+ Disp_State (Get_Edge_Dest (E));
+ Disp_Token (Ctxt, Tok_Colon); -- To display ": "
+ Disp_Psl_Expression (Ctxt, Get_Edge_Expr (E));
+ OOB.New_Line;
+ E := Get_Next_Src_Edge (E);
end loop;
- end if;
+ S := Get_Next_State (S);
+ end loop;
end Disp_PSL_NFA;
procedure Disp_Psl_Assert_Directive