Handle unexpected not in sequence

Signed-off-by: Bartłomiej Chmiel <bchmiel@antmicro.com>
This commit is contained in:
Bartłomiej Chmiel 2025-11-06 10:41:30 +01:00
parent 4719eb9739
commit 3104f89665
No known key found for this signature in database
GPG Key ID: AF7A8DBF070764A4
2 changed files with 4 additions and 7 deletions

View File

@ -6623,11 +6623,7 @@ sexpr<nodeExprp>: // ==IEEE: sequence_expr (The name sexpr is important as reg
// // IEEE: "sequence_expr cycle_delay_range sequence_expr { cycle_delay_range sequence_expr }"
// // Both rules basically mean we can repeat sequences, so make it simpler:
cycle_delay_range ~p~sexpr %prec yP_POUNDPOUND
{ $$ = new AstSExpr{$<fl>1, $1, $2};
if (VN_IS($2, LogNot)) {
BBUNSUP($2->fileline(), "Unexpected not in sequence expression context");
}
}
{ $$ = new AstSExpr{$<fl>1, $1, $2}; }
| ~p~sexpr cycle_delay_range sexpr %prec prPOUNDPOUND_MULTI
{ $$ = new AstSExpr{$<fl>2, $1, $2, $3}; }
//

View File

@ -1,5 +1,6 @@
%Error-UNSUPPORTED: t/t_property_sexpr_bad.v:20:39: Unexpected not in sequence expression context
%Error: t/t_property_sexpr_bad.v:20:39: Unexpected 'not' in sequence expression context
: ... note: In instance 't'
20 | assert property (@(posedge clk) ##1 not val);
| ^~~
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance.
%Error: Exiting due to