From 507c63d112658b658cc1f1fbbcbb20edc212294c Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 4 Dec 2013 09:10:16 +0100 Subject: Added support for local regs in named blocks --- frontends/verilog/parser.y | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'frontends/verilog') diff --git a/frontends/verilog/parser.y b/frontends/verilog/parser.y index 1ffa4e94..5a45a776 100644 --- a/frontends/verilog/parser.y +++ b/frontends/verilog/parser.y @@ -407,7 +407,6 @@ opt_signed: }; task_func_body: - task_func_body wire_decl | task_func_body behavioral_stmt | /* empty */; @@ -761,7 +760,7 @@ simple_behavioral_stmt: // this production creates the obligatory if-else shift/reduce conflict behavioral_stmt: - defattr | + defattr | wire_decl | simple_behavioral_stmt ';' | hierarchical_id attr { AstNode *node = new AstNode(AST_TCALL); @@ -778,7 +777,11 @@ behavioral_stmt: ast_stack.back()->children.push_back(node); ast_stack.push_back(node); append_attr(node, $1); + if ($3 != NULL) + node->str = *$3; } behavioral_stmt_list TOK_END opt_label { + if ($3 != NULL && $7 != NULL && *$3 != *$7) + frontend_verilog_yyerror("Syntax error."); if ($3 != NULL) delete $3; if ($7 != NULL) -- cgit v1.2.1