From a1a74cb1d9945d984e8726ff62234c1ab4e683f9 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 22 Sep 2024 09:10:01 -0400 Subject: [PATCH] Fix mis-parsing of `constraint = new`. --- src/verilog.y | 8 -------- test_regress/t/t_flag_wpedantic_bad.out | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/verilog.y b/src/verilog.y index c80cbf488..1f2b62e3f 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -2297,9 +2297,6 @@ member_decl_assignment: // Derived from IEEE: variable_decl_assi // // IEEE: "class_variable_identifier [ '=' class_new ]" // // variable_dimensionE must be empty // // Pushed into variable_declExpr:dynamic_array_new - // - // // IEEE: "[ covergroup_variable_identifier ] '=' class_new - // // Pushed into variable_declExpr:class_new ; list_of_variable_decl_assignments: // ==IEEE: list_of_variable_decl_assignments @@ -2319,11 +2316,6 @@ variable_decl_assignment: // ==IEEE: variable_decl_assignment // // IEEE: "class_variable_identifier [ '=' class_new ]" // // variable_dimensionE must be empty // // Pushed into variable_declExpr:dynamic_array_new - // - // // IEEE: "[ covergroup_variable_identifier ] '=' class_new - // // Pushed into variable_declExpr:class_new - | '=' class_new - { $$ = nullptr; BBUNSUP($1, "Unsupported: declaration assignment with new()"); } ; list_of_tf_variable_identifiers: // ==IEEE: list_of_tf_variable_identifiers diff --git a/test_regress/t/t_flag_wpedantic_bad.out b/test_regress/t/t_flag_wpedantic_bad.out index 707d92b51..f6b196425 100644 --- a/test_regress/t/t_flag_wpedantic_bad.out +++ b/test_regress/t/t_flag_wpedantic_bad.out @@ -1,4 +1,4 @@ -%Error: t/t_flag_wpedantic_bad.v:8:8: syntax error, unexpected global +%Error: t/t_flag_wpedantic_bad.v:8:8: syntax error, unexpected global, expecting IDENTIFIER or do or final or randomize 8 | reg global; | ^~~~~~ %Error: Exiting due to