diff options
Diffstat (limited to 'frontends/ilang')
-rw-r--r-- | frontends/ilang/ilang_parser.y | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/frontends/ilang/ilang_parser.y b/frontends/ilang/ilang_parser.y index 0522fa72a..8e21fb176 100644 --- a/frontends/ilang/ilang_parser.y +++ b/frontends/ilang/ilang_parser.y @@ -143,11 +143,18 @@ module_body: /* empty */; module_stmt: - param_stmt | attr_stmt | wire_stmt | memory_stmt | cell_stmt | proc_stmt | conn_stmt; + param_stmt | param_defval_stmt | attr_stmt | wire_stmt | memory_stmt | cell_stmt | proc_stmt | conn_stmt; param_stmt: TOK_PARAMETER TOK_ID EOL { - current_module->avail_parameters.insert($2); + current_module->avail_parameters($2); + free($2); + }; + +param_defval_stmt: + TOK_PARAMETER TOK_ID constant EOL { + current_module->avail_parameters($2); + current_module->parameter_default_values[$2] = *$3; free($2); }; |