From 6aa8e49b09c03f041809aa687e329f77b565578a Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 13 Dec 2014 17:46:56 +0000 Subject: [PATCH] Add sorry message for unsupported arrays of named events. --- parse.y | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/parse.y b/parse.y index a69b43c1a..d9696431a 100644 --- a/parse.y +++ b/parse.y @@ -562,8 +562,8 @@ static void current_function_set_statement(const YYLTYPE&loc, vector %type udp_initial udp_init_opt %type udp_initial_expr_opt -%type register_variable net_variable endlabel_opt class_declaration_endlabel_opt -%type register_variable_list net_variable_list +%type register_variable net_variable event_variable endlabel_opt class_declaration_endlabel_opt +%type register_variable_list net_variable_list event_variable_list %type list_of_identifiers loop_variables %type list_of_port_identifiers @@ -2186,8 +2186,8 @@ block_item_decl { if ($2) pform_set_data_type(@2, $2, $3, NetNet::REG, attributes_in_context); } - | K_event list_of_identifiers ';' - { pform_make_events($2, @1.text, @1.first_line); + | K_event event_variable_list ';' + { if ($2) pform_make_events($2, @1.text, @1.first_line); } | K_parameter param_type parameter_assign_list ';' @@ -5338,6 +5338,23 @@ net_variable_list } ; +event_variable + : IDENTIFIER dimensions_opt + { if ($2) { + yyerror(@2, "sorry: event arrays are not supported."); + delete $2; + } + $$ = $1; + } + ; + +event_variable_list + : event_variable + { $$ = list_from_identifier($1); } + | event_variable_list ',' event_variable + { $$ = list_from_identifier($1, $3); } + ; + specify_item : K_specparam specparam_decl ';' | specify_simple_path_decl ';'