diff --git a/Changes b/Changes index 812b4d5cd..f7920164f 100644 --- a/Changes +++ b/Changes @@ -7,6 +7,8 @@ indicates the contributor was also the author of the fix; Thanks! **** Fix some constant parameter functions causing crash, bug253. [Nick Bowler] +**** Fix do {...} while() not requiring final semicolon. + * Verilator 3.802 2010/05/01 *** Support runtime access to public signal names. diff --git a/src/verilog.y b/src/verilog.y index f3a043acf..7d43f3973 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -1864,7 +1864,7 @@ statement_item: // IEEE: statement_item // // for's first ';' is in for_initalization | yFOR '(' for_initialization expr ';' for_stepE ')' stmtBlock { $$ = new AstBegin($1,"",$3); $3->addNext(new AstWhile($1, $4,$8,$6)); } - | yDO stmtBlock yWHILE '(' expr ')' { $$ = $2->cloneTree(true); $$->addNext(new AstWhile($1,$5,$2));} + | yDO stmtBlock yWHILE '(' expr ')' ';' { $$ = $2->cloneTree(true); $$->addNext(new AstWhile($1,$5,$2));} //UNSUP yFOREACH '(' idClassForeach/*array_id[loop_variables]*/ ')' stmt { UNSUP } // // // IEEE: jump_statement