Fix misc bad-syntax crashes, bug1529.

This commit is contained in:
Wilson Snyder 2019-09-30 19:22:14 -04:00
parent 9d6b0d7dd6
commit 12fa085b26
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ The contributors that suggested a given feature are shown in []. Thanks!
**** Fix ugly error on interface misuse, bug1525. [Bogdan Vukobratovic]
**** Fix misc bad-syntax crashes, bug1532. [Eric Rippey]
**** Fix misc bad-syntax crashes, bug1529, bug1532. [Eric Rippey]
* Verilator 4.018 2019-08-29

View File

@ -2694,7 +2694,7 @@ patternList<nodep>: // IEEE: part of pattern
;
patternOne<nodep>: // IEEE: part of pattern
expr { $$ = new AstPatMember($1->fileline(),$1,NULL,NULL); }
expr { if ($1) { $$ = new AstPatMember($1->fileline(),$1,NULL,NULL); } else { $$=NULL; } }
| expr '{' argsExprList '}' { $$ = new AstPatMember($2,$3,NULL,$1); }
| patternNoExpr { $$ = $1; }
;