diff options
author | clairexen <claire@symbioticeda.com> | 2020-07-01 16:41:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-01 16:41:32 +0200 |
commit | 7450ee7f8a547aa72d3afa0638af2190cc52c6a9 (patch) | |
tree | 3c965859c5758a818a62303fedc92abded2ccfd8 /frontends | |
parent | 8ce4f8790ecf33f7df19e0fb54a749abe026831d (diff) | |
parent | 76a34dc5f3a60c89efeaa3378ca0e2700a8aebd2 (diff) | |
download | yosys-7450ee7f8a547aa72d3afa0638af2190cc52c6a9.tar.gz yosys-7450ee7f8a547aa72d3afa0638af2190cc52c6a9.tar.bz2 yosys-7450ee7f8a547aa72d3afa0638af2190cc52c6a9.zip |
Merge pull request #2203 from antmicro/fix-grammar
Signed and macro grammar update
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/verilog/verilog_parser.y | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/frontends/verilog/verilog_parser.y b/frontends/verilog/verilog_parser.y index 0fdf2b516..656910c0c 100644 --- a/frontends/verilog/verilog_parser.y +++ b/frontends/verilog/verilog_parser.y @@ -747,7 +747,7 @@ module_body: module_body_stmt: task_func_decl | specify_block | param_decl | localparam_decl | typedef_decl | defparam_decl | specparam_declaration | wire_decl | assign_stmt | cell_stmt | enum_decl | struct_decl | - always_stmt | TOK_GENERATE module_gen_body TOK_ENDGENERATE | defattr | assert_property | checker_decl | ignored_specify_block; + always_stmt | TOK_GENERATE module_gen_body TOK_ENDGENERATE | defattr | assert_property | checker_decl | ignored_specify_block | /* empty statement */ ';'; checker_decl: TOK_CHECKER TOK_ID ';' { @@ -1331,6 +1331,8 @@ ignspec_id: param_signed: TOK_SIGNED { astbuf1->is_signed = true; + } | TOK_UNSIGNED { + astbuf1->is_signed = false; } | /* empty */; param_integer: @@ -1341,14 +1343,14 @@ param_integer: astbuf1->children.back()->children.push_back(AstNode::mkconst_int(31, true)); astbuf1->children.back()->children.push_back(AstNode::mkconst_int(0, true)); astbuf1->is_signed = true; - } | /* empty */; + } param_real: TOK_REAL { if (astbuf1->children.size() != 1) frontend_verilog_yyerror("Parameter already declared as integer, cannot set to real."); astbuf1->children.push_back(new AstNode(AST_REALVALUE)); - } | /* empty */; + } param_range: range { @@ -1359,8 +1361,12 @@ param_range: } }; +param_integer_type: param_integer param_signed +param_range_type: type_vec param_signed param_range +param_implicit_type: param_signed param_range + param_type: - param_signed param_integer param_real param_range | + param_integer_type | param_real | param_range_type | param_implicit_type | hierarchical_type_id { astbuf1->is_custom_type = true; astbuf1->children.push_back(new AstNode(AST_WIRETYPE)); |