Skip to content

Commit

Permalink
Re-sync parser on endclass
Browse files Browse the repository at this point in the history
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
  • Loading branch information
kozdra committed Sep 11, 2024
1 parent 6b8f253 commit 140eb0a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/verilog.y
Original file line number Diff line number Diff line change
Expand Up @@ -7030,14 +7030,14 @@ class_declaration<nodep>: // ==IEEE: part of class_declaration
/*mid*/ { // Allow resolving types declared in base extends class
if ($<scp>3) SYMP->importExtends($<scp>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($<fl>9, $1, $9); }
GRAMMARP->endLabel($<fl>8, $1, $8); }
;

classFront<classp>: // IEEE: part of class_declaration
Expand Down Expand Up @@ -7216,9 +7216,11 @@ localNextId<nodeExprp>: // local

//^^^=========

class_itemListE<nodep>:
/* empty */ { $$ = nullptr; }
| class_itemList { $$ = $1; }
class_itemListEnd<nodep>:
yENDCLASS { $$ = nullptr; }
| class_itemList yENDCLASS { $$ = $1; }
| error yENDCLASS { $$ = nullptr; }
| class_itemList error yENDCLASS { $$ = $1; }
;

class_itemList<nodep>:
Expand Down

0 comments on commit 140eb0a

Please sign in to comment.