diff --git a/src/verilog.y b/src/verilog.y index b254bf338..e20da0387 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -7030,14 +7030,14 @@ class_declaration: // ==IEEE: part of class_declaration /*mid*/ { // Allow resolving types declared in base extends class if ($3) SYMP->importExtends($3); } - /*cont*/ class_itemListE yENDCLASS endLabelE + /*cont*/ class_itemListEnd endLabelE { $$ = $1; $1->addMembersp($2); if ($2) $1->isParameterized(true); $1->addExtendsp($3); $1->addExtendsp($4); $1->addMembersp($7); SYMP->popScope($$); - GRAMMARP->endLabel($9, $1, $9); } + GRAMMARP->endLabel($8, $1, $8); } ; classFront: // IEEE: part of class_declaration @@ -7216,9 +7216,11 @@ localNextId: // local //^^^========= -class_itemListE: - /* empty */ { $$ = nullptr; } - | class_itemList { $$ = $1; } +class_itemListEnd: + yENDCLASS { $$ = nullptr; } + | class_itemList yENDCLASS { $$ = $1; } + | error yENDCLASS { $$ = nullptr; } + | class_itemList error yENDCLASS { $$ = $1; } ; class_itemList: