aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-08-14 08:28:59 +0200
committerTristan Gingold <tgingold@free.fr>2019-08-14 08:28:59 +0200
commit58b2c934de954596e6e24591e0fc219be21bf850 (patch)
tree4a8b610505d7d203c5ad3c3760854fd85df12cbd /src
parent5cfb8e78cd5d7bdc83494bd72cbe17bf4921bda8 (diff)
downloadghdl-58b2c934de954596e6e24591e0fc219be21bf850.tar.gz
ghdl-58b2c934de954596e6e24591e0fc219be21bf850.tar.bz2
ghdl-58b2c934de954596e6e24591e0fc219be21bf850.zip
vhdl: handle PSL keywords as vhdl08 reserved words; switch to PSL scanner mode.
Diffstat (limited to 'src')
-rw-r--r--src/synth/synth-decls.adb3
-rw-r--r--src/vhdl/vhdl-parse.adb9
2 files changed, 12 insertions, 0 deletions
diff --git a/src/synth/synth-decls.adb b/src/synth/synth-decls.adb
index 53a5b0c5f..31540cf7d 100644
--- a/src/synth/synth-decls.adb
+++ b/src/synth/synth-decls.adb
@@ -466,6 +466,9 @@ package body Synth.Decls is
null;
when Iir_Kind_File_Declaration =>
null;
+ when Iir_Kind_Psl_Default_Clock =>
+ -- Ignored; directly used by PSL directives.
+ null;
when others =>
Error_Kind ("synth_declaration", Decl);
end case;
diff --git a/src/vhdl/vhdl-parse.adb b/src/vhdl/vhdl-parse.adb
index e10786022..cf2a1968e 100644
--- a/src/vhdl/vhdl-parse.adb
+++ b/src/vhdl/vhdl-parse.adb
@@ -8632,6 +8632,9 @@ package body Vhdl.Parse is
begin
Res := Create_Iir (Iir_Kind_Psl_Assume_Directive);
+ -- Accept PSL tokens
+ Vhdl.Scanner.Flag_Psl := True;
+
-- Skip 'assume'
Scan;
@@ -8651,6 +8654,9 @@ package body Vhdl.Parse is
begin
Res := Create_Iir (Iir_Kind_Psl_Cover_Directive);
+ -- Accept PSL tokens
+ Vhdl.Scanner.Flag_Psl := True;
+
-- Skip 'cover'
Scan;
@@ -8667,6 +8673,9 @@ package body Vhdl.Parse is
begin
Res := Create_Iir (Iir_Kind_Psl_Restrict_Directive);
+ -- Accept PSL tokens
+ Vhdl.Scanner.Flag_Psl := True;
+
-- Skip 'restrict'
Scan;