From 9d1a39a5e4d91c429784e483a9a781d223ecc79e Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 1 Jul 2020 18:01:32 -0400 Subject: [PATCH] Parser: Move 'with' block unsupported messages down out of parser --- src/verilog.y | 2 +- test_regress/t/t_randomize.out | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/verilog.y b/src/verilog.y index ceb54f11c..0aae0da4b 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -3459,7 +3459,7 @@ function_subroutine_callNoMethod: // IEEE: function_subroutine_call (as f // // We implement randomize as a normal funcRef, since randomize isn't a keyword // // Note yNULL is already part of expressions, so they come for free | funcRef yWITH__CUR constraint_block { $$ = $1; BBUNSUP($2, "Unsupported: randomize() 'with' constraint"); } - | funcRef yWITH__CUR '{' '}' { $$ = $1; BBUNSUP($2, "Unsupported: randomize() 'with'"); } + | funcRef yWITH__CUR '{' '}' { $$ = new AstWith($2, false, $1, NULL); } ; system_t_call: // IEEE: system_tf_call (as task) diff --git a/test_regress/t/t_randomize.out b/test_regress/t/t_randomize.out index 9224cf088..f508c1cd0 100644 --- a/test_regress/t/t_randomize.out +++ b/test_regress/t/t_randomize.out @@ -34,7 +34,4 @@ %Error-UNSUPPORTED: t/t_randomize.v:30:4: Unsupported: constraint 30 | constraint dis { | ^~~~~~~~~~ -%Error-UNSUPPORTED: t/t_randomize.v:50:25: Unsupported: randomize() 'with' - 50 | v = p.randomize() with {}; - | ^~~~ %Error: Exiting due to