From 6b8f253ecde0374632f99d01601bfb120c491a18 Mon Sep 17 00:00:00 2001 From: Arkadiusz Kozdra Date: Wed, 11 Sep 2024 14:09:13 +0200 Subject: [PATCH] Re-sync parser in constraints and cross coverpoints Signed-off-by: Arkadiusz Kozdra --- src/verilog.y | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/verilog.y b/src/verilog.y index 6443e72f4..b254bf338 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -6733,6 +6733,8 @@ cross_body: // ==IEEE: cross_body cross_body_itemSemiList: // IEEE: part of cross_body cross_body_item ';' { $$ = $1; } | cross_body_itemSemiList cross_body_item ';' { $$ = addNextNull($1, $2); } + | error ';' { $$ = nullptr; } + | cross_body_itemSemiList error ';' { $$ = $1; } ; cross_body_item: // ==IEEE: cross_body_item @@ -7331,6 +7333,8 @@ constraintIdNew: // IEEE: id part of class_constraint constraint_block: // ==IEEE: constraint_block '{' constraint_block_itemList '}' { $$ = $2; } + | '{' error '}' { $$ = nullptr; } + | '{' constraint_block_itemList error '}' { $$ = $2; } ; constraint_block_itemList: // IEEE: { constraint_block_item } @@ -7387,11 +7391,15 @@ constraint_expression: // ==IEEE: constraint_expression { AstConstraintExpr* const newp = new AstConstraintExpr{$1, $3}; newp->isDisableSoft(true); $$ = newp; } + | error ';' + { $$ = nullptr; } ; constraint_set: // ==IEEE: constraint_set constraint_expression { $$ = $1; } | '{' constraint_expressionList '}' { $$ = $2; } + | '{' error '}' { $$ = nullptr; } + | '{' constraint_expressionList error '}' { $$ = $2; } ; dist_list: // ==IEEE: dist_list