aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/parse.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-01-15 08:01:27 +0100
committerTristan Gingold <tgingold@free.fr>2017-01-15 08:01:27 +0100
commitf6c9bc0e66602c86003f118d8d8e35693d4abcaf (patch)
treea7b9a92a785d9c0ceec7a901a27a5b657374c1e4 /src/vhdl/parse.adb
parent26cb40f846c974ccec22bf1165e5b519bba2247c (diff)
downloadghdl-f6c9bc0e66602c86003f118d8d8e35693d4abcaf.tar.gz
ghdl-f6c9bc0e66602c86003f118d8d8e35693d4abcaf.tar.bz2
ghdl-f6c9bc0e66602c86003f118d8d8e35693d4abcaf.zip
Add xref_keyword for PSL keywords that aren't reserved words.
Diffstat (limited to 'src/vhdl/parse.adb')
-rw-r--r--src/vhdl/parse.adb16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb
index 3adf845e2..fbe5a9f95 100644
--- a/src/vhdl/parse.adb
+++ b/src/vhdl/parse.adb
@@ -3888,14 +3888,26 @@ package body Parse is
begin
Res := Create_Iir (Iir_Kind_Psl_Default_Clock);
Set_Location (Res);
+
+ -- Recognize PSL keywords.
Scanner.Flag_Psl := True;
+
+ -- Skip 'default'.
Scan_Expect (Tok_Psl_Clock);
+ Xrefs.Xref_Keyword (Get_Token_Location);
+
+ -- Skip 'clock'.
Scan_Expect (Tok_Is);
+
+ -- Skip 'is'.
Scan;
+
Set_Psl_Boolean (Res, Parse_Psl.Parse_Psl_Boolean);
Expect (Tok_Semi_Colon);
+
Scanner.Flag_Scan_In_Comment := False;
Scanner.Flag_Psl := False;
+
return Res;
end Parse_Psl_Default_Clock;
@@ -4420,6 +4432,10 @@ package body Parse is
if Vhdl_Std >= Vhdl_08
and then Current_Identifier = Name_Default
then
+ -- This identifier is a PSL keyword.
+ Xrefs.Xref_Keyword (Get_Token_Location);
+
+ -- Check whether default clock are allowed in this region.
case Get_Kind (Parent) is
when Iir_Kind_Function_Body
| Iir_Kind_Procedure_Body