diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-02-13 18:00:36 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-02-14 13:52:34 +0100 |
commit | ace70f3cc4d5ac8d5fb7e02e96d5b3187319e520 (patch) | |
tree | 775665dcf6ac26054734e1cc9a543bbc8f2281b9 /src/vhdl/parse_psl.adb | |
parent | 2c88f7c0f5a9859eeb118147444afbd47c71c2a8 (diff) | |
download | ghdl-ace70f3cc4d5ac8d5fb7e02e96d5b3187319e520.tar.gz ghdl-ace70f3cc4d5ac8d5fb7e02e96d5b3187319e520.tar.bz2 ghdl-ace70f3cc4d5ac8d5fb7e02e96d5b3187319e520.zip |
psl: cover directive works on a sequence, not on a property.
Diffstat (limited to 'src/vhdl/parse_psl.adb')
-rw-r--r-- | src/vhdl/parse_psl.adb | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/vhdl/parse_psl.adb b/src/vhdl/parse_psl.adb index 506218ade..a356043aa 100644 --- a/src/vhdl/parse_psl.adb +++ b/src/vhdl/parse_psl.adb @@ -77,17 +77,18 @@ package body Parse_Psl is function Vhdl_To_Psl (N : Iirs.Iir) return Node is + use Iirs; Res : Node; begin Res := Create_Node_Loc (N_HDL_Expr); - Set_Location (Res, Iirs.Get_Location (N)); - Set_HDL_Node (Res, Int32 (N)); + if N /= Null_Iir then + Set_Location (Res, Get_Location (N)); + Set_HDL_Node (Res, Int32 (N)); + end if; return Res; end Vhdl_To_Psl; function Parse_FL_Property (Prio : Priority) return Node; - function Parse_Sequence return Node; - function Parse_Parenthesis_Boolean return Node; function Parse_Boolean (Parent_Prio : Priority) return Node; @@ -161,7 +162,7 @@ package body Parse_Psl is Kind : Nkind; Op_Prio : Priority; begin - Left := Parse_Sequence; -- FIXME: allow boolean; + Left := Parse_Psl_Sequence; -- FIXME: allow boolean; loop case Current_Token is when Tok_Semi_Colon => @@ -282,7 +283,7 @@ package body Parse_Psl is end if; end Parse_Bracket_Number; - function Parse_Sequence return Node is + function Parse_Psl_Sequence return Node is Res, N : Node; begin case Current_Token is @@ -331,7 +332,7 @@ package body Parse_Psl is return Res; end case; end loop; - end Parse_Sequence; + end Parse_Psl_Sequence; -- precond: '(' -- postcond: next token @@ -430,7 +431,7 @@ package body Parse_Psl is when Tok_Left_Paren => return Parse_Parenthesis_FL_Property; when Tok_Left_Curly => - Res := Parse_Sequence; + Res := Parse_Psl_Sequence; if Get_Kind (Res) = N_Braced_SERE and then Current_Token = Tok_Left_Paren then @@ -442,7 +443,7 @@ package body Parse_Psl is Res := Tmp; end if; when others => - Res := Parse_Sequence; + Res := Parse_Psl_Sequence; end case; return Res; end Parse_FL_Property_1; @@ -663,7 +664,7 @@ package body Parse_Psl is Set_Property (Res, Parse_Psl_Property); when N_Sequence_Declaration | N_Endpoint_Declaration => - Set_Sequence (Res, Parse_Sequence); + Set_Sequence (Res, Parse_Psl_Sequence); when others => raise Internal_Error; end case; |