diff options
author | Clifford Wolf <clifford@clifford.at> | 2013-12-04 09:10:16 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2013-12-04 09:10:16 +0100 |
commit | 507c63d112658b658cc1f1fbbcbb20edc212294c (patch) | |
tree | 7ce4bea24d137fc50179f11a4148a03640d4d99d /frontends/verilog | |
parent | b5afd75b0a8b620615bc53fa36d920760bdec46f (diff) | |
download | yosys-507c63d112658b658cc1f1fbbcbb20edc212294c.tar.gz yosys-507c63d112658b658cc1f1fbbcbb20edc212294c.tar.bz2 yosys-507c63d112658b658cc1f1fbbcbb20edc212294c.zip |
Added support for local regs in named blocks
Diffstat (limited to 'frontends/verilog')
-rw-r--r-- | frontends/verilog/parser.y | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/frontends/verilog/parser.y b/frontends/verilog/parser.y index 1ffa4e942..5a45a7761 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) |