mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-12 20:18:20 +00:00
made the generate..endgenrate keywords optional
This commit is contained in:
parent
76da2fe172
commit
5281562d0e
|
@ -373,6 +373,8 @@ range_or_integer:
|
||||||
|
|
||||||
module_body:
|
module_body:
|
||||||
module_body module_body_stmt |
|
module_body module_body_stmt |
|
||||||
|
/* the following line makes the generate..endgenrate keywords optional */
|
||||||
|
module_body gen_stmt |
|
||||||
/* empty */;
|
/* empty */;
|
||||||
|
|
||||||
module_body_stmt:
|
module_body_stmt:
|
||||||
|
@ -1013,9 +1015,12 @@ single_arg:
|
||||||
};
|
};
|
||||||
|
|
||||||
module_gen_body:
|
module_gen_body:
|
||||||
module_gen_body gen_stmt |
|
module_gen_body gen_stmt_or_module_body_stmt |
|
||||||
/* empty */;
|
/* empty */;
|
||||||
|
|
||||||
|
gen_stmt_or_module_body_stmt:
|
||||||
|
gen_stmt | module_body_stmt;
|
||||||
|
|
||||||
// this production creates the obligatory if-else shift/reduce conflict
|
// this production creates the obligatory if-else shift/reduce conflict
|
||||||
gen_stmt:
|
gen_stmt:
|
||||||
TOK_FOR '(' {
|
TOK_FOR '(' {
|
||||||
|
@ -1054,15 +1059,14 @@ gen_stmt:
|
||||||
if ($6 != NULL)
|
if ($6 != NULL)
|
||||||
delete $6;
|
delete $6;
|
||||||
ast_stack.pop_back();
|
ast_stack.pop_back();
|
||||||
} |
|
};
|
||||||
module_body_stmt;
|
|
||||||
|
|
||||||
gen_stmt_block:
|
gen_stmt_block:
|
||||||
{
|
{
|
||||||
AstNode *node = new AstNode(AST_GENBLOCK);
|
AstNode *node = new AstNode(AST_GENBLOCK);
|
||||||
ast_stack.back()->children.push_back(node);
|
ast_stack.back()->children.push_back(node);
|
||||||
ast_stack.push_back(node);
|
ast_stack.push_back(node);
|
||||||
} gen_stmt {
|
} gen_stmt_or_module_body_stmt {
|
||||||
ast_stack.pop_back();
|
ast_stack.pop_back();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue