Allow constant expressions without parentheses in PATHPULSE$ declaration (#7199)

This commit is contained in:
Pawel Kojma
2026-03-11 06:01:33 -04:00
committed by GitHub
parent 5bf1d060c9
commit 4e6eafd994
2 changed files with 14 additions and 10 deletions
+8 -9
View File
@@ -3038,13 +3038,9 @@ delay_value<nodeExprp>: // ==IEEE:delay_value
| y1STEP { $$ = new AstConst{$<fl>1, AstConst::OneStep{}}; }
;
delayExpr<nodeExprp>:
expr { $$ = $1; }
;
minTypMax<nodeExprp>: // IEEE: mintypmax_expression and constant_mintypmax_expression
delayExpr { $$ = $1; }
| delayExpr ':' delayExpr ':' delayExpr { $$ = $3; MINTYPMAXDLYUNSUP($3); DEL($1); DEL($5); }
expr { $$ = $1; }
| expr ':' expr ':' expr { $$ = $3; MINTYPMAXDLYUNSUP($3); DEL($1); DEL($5); }
;
minTypMaxE<nodeExprp>:
@@ -5935,10 +5931,13 @@ specparam_assignment<varp>: // ==IEEE: specparam_assignment
idNotPathpulse sigAttrListE '=' minTypMax
{ $$ = VARDONEA($<fl>1, *$1, nullptr, $2);
if ($4) $$->valuep($4); }
// // IEEE: pulse_control_specparam
| idPathpulse sigAttrListE '=' '(' minTypMax ')'
// // IEEE: pulse_control_specparam
// // LRM grammar requires '(' as the first token after assignment,
// // but IEEE provides an example in 30.7.1 where it is omitted.
// // Other simulators also support it.
| idPathpulse sigAttrListE '=' minTypMax
{ $$ = VARDONEA($<fl>1, *$1, nullptr, $2);
if ($5) $$->valuep($5); }
if ($4) $$->valuep($4); }
| idPathpulse sigAttrListE '=' '(' minTypMax ',' minTypMax ')'
{ $$ = VARDONEA($<fl>1, *$1, nullptr, $2);
if ($5) $$->valuep($5);