mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-29 01:03:29 +02:00
Add support for closing a procedural begin/fork block with a name
This commit is contained in:
@@ -5435,14 +5435,18 @@ statement_item /* This is roughly statement_item in the LRM */
|
||||
current_block_stack.push(tmp);
|
||||
}
|
||||
block_item_decls_opt
|
||||
statement_or_null_list_opt K_end
|
||||
statement_or_null_list_opt K_end endname_opt
|
||||
{ pform_pop_scope();
|
||||
assert(! current_block_stack.empty());
|
||||
PBlock*tmp = current_block_stack.top();
|
||||
current_block_stack.pop();
|
||||
if ($6) tmp->set_statement(*$6);
|
||||
delete[]$3;
|
||||
delete $6;
|
||||
if ($8 && (strcmp($3,$8) != 0)) {
|
||||
yyerror(@8, "error: End name doesn't match begin name");
|
||||
}
|
||||
if ($8) delete[]$8;
|
||||
delete[]$3;
|
||||
$$ = tmp;
|
||||
}
|
||||
|
||||
@@ -5469,15 +5473,19 @@ statement_item /* This is roughly statement_item in the LRM */
|
||||
current_block_stack.push(tmp);
|
||||
}
|
||||
block_item_decls_opt
|
||||
statement_or_null_list_opt join_keyword
|
||||
statement_or_null_list_opt join_keyword endname_opt
|
||||
{ pform_pop_scope();
|
||||
assert(! current_block_stack.empty());
|
||||
PBlock*tmp = current_block_stack.top();
|
||||
current_block_stack.pop();
|
||||
tmp->set_join_type($7);
|
||||
if ($6) tmp->set_statement(*$6);
|
||||
delete[]$3;
|
||||
delete $6;
|
||||
if ($8 && (strcmp($3,$8) != 0)) {
|
||||
yyerror(@8, "error: End name doesn't match fork name");
|
||||
}
|
||||
if ($8) delete[]$8;
|
||||
delete[]$3;
|
||||
$$ = tmp;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user