diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-07-04 18:20:07 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-07-04 18:20:07 +0200 |
commit | e669bf61068a516e54e6547490164a54728d81aa (patch) | |
tree | 51b0d6cede6892102cb2b77aeca5160d2e46fa45 /src/vhdl/vhdl-parse.adb | |
parent | 76482ce0e7ce6e03bc5e17e217ac6d8b6f075846 (diff) | |
download | ghdl-e669bf61068a516e54e6547490164a54728d81aa.tar.gz ghdl-e669bf61068a516e54e6547490164a54728d81aa.tar.bz2 ghdl-e669bf61068a516e54e6547490164a54728d81aa.zip |
vhdl: parse and analyze restrict directive.
Diffstat (limited to 'src/vhdl/vhdl-parse.adb')
-rw-r--r-- | src/vhdl/vhdl-parse.adb | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/vhdl/vhdl-parse.adb b/src/vhdl/vhdl-parse.adb index 36750870f..e9230221e 100644 --- a/src/vhdl/vhdl-parse.adb +++ b/src/vhdl/vhdl-parse.adb @@ -8600,7 +8600,7 @@ package body Vhdl.Parse is return Res; end Parse_Psl_Assert_Statement; - function Parse_Psl_Cover_Statement return Iir + function Parse_Psl_Cover_Directive return Iir is Res : Iir; begin @@ -8614,7 +8614,26 @@ package body Vhdl.Parse is Parse_Psl_Assert_Report_Severity (Res); return Res; - end Parse_Psl_Cover_Statement; + end Parse_Psl_Cover_Directive; + + function Parse_Psl_Restrict_Directive return Iir + is + Res : Iir; + begin + Res := Create_Iir (Iir_Kind_Psl_Restrict_Directive); + + -- Skip 'restrict' + Scan; + + Set_Psl_Sequence (Res, Parse_Psl.Parse_Psl_Sequence (True)); + + -- No more PSL tokens after the sequence. + Vhdl.Scanner.Flag_Psl := False; + Vhdl.Scanner.Flag_Scan_In_Comment := False; + + Expect_Scan (Tok_Semi_Colon); + return Res; + end Parse_Psl_Restrict_Directive; -- precond : first token -- postcond: next token (end/else/when...) @@ -8780,7 +8799,10 @@ package body Vhdl.Parse is Stmt := Parse_Psl_Declaration; when Tok_Psl_Cover => Postponed_Not_Allowed; - Stmt := Parse_Psl_Cover_Statement; + Stmt := Parse_Psl_Cover_Directive; + when Tok_Psl_Restrict => + Postponed_Not_Allowed; + Stmt := Parse_Psl_Restrict_Directive; when Tok_Wait | Tok_Loop | Tok_While => |