aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/verilog/verilog_parser.y
diff options
context:
space:
mode:
authorPeter Crozier <peter@crozier.com>2020-06-07 18:28:45 +0100
committerPeter Crozier <peter@crozier.com>2020-06-07 18:33:11 +0100
commit76c499db71fd6aaae8d2c5436c648d81cc8233f5 (patch)
tree74f227ad74683dbda53e1f38088b84aa601200e0 /frontends/verilog/verilog_parser.y
parent534be6670d765fd73ff222fca1899b2b83670d5f (diff)
downloadyosys-76c499db71fd6aaae8d2c5436c648d81cc8233f5.tar.gz
yosys-76c499db71fd6aaae8d2c5436c648d81cc8233f5.tar.bz2
yosys-76c499db71fd6aaae8d2c5436c648d81cc8233f5.zip
Support packed arrays in struct/union.
Diffstat (limited to 'frontends/verilog/verilog_parser.y')
-rw-r--r--frontends/verilog/verilog_parser.y10
1 files changed, 5 insertions, 5 deletions
diff --git a/frontends/verilog/verilog_parser.y b/frontends/verilog/verilog_parser.y
index c4867356c..b34a62248 100644
--- a/frontends/verilog/verilog_parser.y
+++ b/frontends/verilog/verilog_parser.y
@@ -1554,10 +1554,10 @@ member_name_list:
member_name: TOK_ID {
astbuf1->str = $1->substr(1);
delete $1;
- auto member_node = astbuf1->clone();
- SET_AST_NODE_LOC(member_node, @1, @1);
- astbuf2->children.push_back(member_node);
- }
+ astbuf3 = astbuf1->clone();
+ SET_AST_NODE_LOC(astbuf3, @1, @1);
+ astbuf2->children.push_back(astbuf3);
+ } range { if ($3) astbuf3->children.push_back($3); }
;
struct_member_type: { astbuf1 = new AstNode(AST_STRUCT_ITEM); } member_type_token
@@ -1595,7 +1595,7 @@ member_type_token:
;
member_type: type_atom type_signing
- | type_vec type_signing range { if ($3) astbuf1->children.push_back($3); }
+ | type_vec type_signing range_or_multirange { if ($3) astbuf1->children.push_back($3); }
;
struct_var_list: struct_var