3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-12 20:18:20 +00:00

Improved read_verilog support for empty behavioral statements

This commit is contained in:
Clifford Wolf 2015-02-10 12:17:29 +01:00
parent 510deb3577
commit 4f68a77e3f

View file

@ -946,7 +946,7 @@ simple_behavioral_stmt:
// this production creates the obligatory if-else shift/reduce conflict // this production creates the obligatory if-else shift/reduce conflict
behavioral_stmt: behavioral_stmt:
defattr | assert | wire_decl | defattr | assert | wire_decl |
simple_behavioral_stmt ';' | simple_behavioral_stmt ';' | ';' |
hierarchical_id attr { hierarchical_id attr {
AstNode *node = new AstNode(AST_TCALL); AstNode *node = new AstNode(AST_TCALL);
node->str = *$1; node->str = *$1;
@ -1060,10 +1060,6 @@ opt_synopsys_attr:
} | } |
/* empty */; /* empty */;
behavioral_stmt_opt:
behavioral_stmt |
';' ;
behavioral_stmt_list: behavioral_stmt_list:
behavioral_stmt_list behavioral_stmt | behavioral_stmt_list behavioral_stmt |
/* empty */; /* empty */;
@ -1092,7 +1088,7 @@ case_item:
ast_stack.back()->children.push_back(block); ast_stack.back()->children.push_back(block);
ast_stack.push_back(block); ast_stack.push_back(block);
case_type_stack.push_back(0); case_type_stack.push_back(0);
} behavioral_stmt_opt { } behavioral_stmt {
case_type_stack.pop_back(); case_type_stack.pop_back();
ast_stack.pop_back(); ast_stack.pop_back();
ast_stack.pop_back(); ast_stack.pop_back();