From 221084d838f3cd85ff77046c28a3fe2906e5c040 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Tue, 10 Jan 2017 11:38:38 -0800 Subject: [PATCH] Sorry message for procedural assertion statements. --- parse.y | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/parse.y b/parse.y index 86e075a47..34d9064c3 100644 --- a/parse.y +++ b/parse.y @@ -655,6 +655,7 @@ static void current_function_set_statement(const YYLTYPE&loc, vector %type statement statement_item statement_or_null %type compressed_statement %type loop_statement for_step jump_statement +%type procedural_assertion_statement %type statement_or_null_list statement_or_null_list_opt %type analog_statement @@ -1815,6 +1816,21 @@ property_expr /* IEEE1800-2012 A.2.10 */ : expression ; +procedural_assertion_statement /* IEEE1800-2012 A.6.10 */ + : K_assert '(' expression ')' statement %prec less_than_K_else + { yyerror(@1, "sorry: Simple immediate assertion statements not implemented."); + $$ = 0; + } + | K_assert '(' expression ')' K_else statement + { yyerror(@1, "sorry: Simple immediate assertion statements not implemented."); + $$ = 0; + } + | K_assert '(' expression ')' statement K_else statement + { yyerror(@1, "sorry: Simple immediate assertion statements not implemented."); + $$ = 0; + } + ; + /* The property_qualifier rule is as literally described in the LRM, but the use is usually as { property_qualifier }, which is implemented by the property_qualifier_opt rule below. */ @@ -6241,6 +6257,8 @@ statement_item /* This is roughly statement_item in the LRM */ $$ = tmp; } + | procedural_assertion_statement { $$ = $1; } + | loop_statement { $$ = $1; } | jump_statement { $$ = $1; }