diff options
author | Maciej Kurc <mkurc@antmicro.com> | 2019-05-31 12:24:12 +0200 |
---|---|---|
committer | Maciej Kurc <mkurc@antmicro.com> | 2019-05-31 14:58:43 +0200 |
commit | a6cadf6318f4eff6197d6c6f0e052c2417689f38 (patch) | |
tree | e287d158a473b27d7723a1b05cc9e3139de007f5 /frontends | |
parent | 90ec2cda4217115fb91206a712befb3e6fa797e5 (diff) | |
download | yosys-a6cadf6318f4eff6197d6c6f0e052c2417689f38.tar.gz yosys-a6cadf6318f4eff6197d6c6f0e052c2417689f38.tar.bz2 yosys-a6cadf6318f4eff6197d6c6f0e052c2417689f38.zip |
Added support for parsing attributes on port connections.
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/verilog/verilog_parser.y | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/frontends/verilog/verilog_parser.y b/frontends/verilog/verilog_parser.y index 8244a8f44..82a1d9d39 100644 --- a/frontends/verilog/verilog_parser.y +++ b/frontends/verilog/verilog_parser.y @@ -1532,27 +1532,27 @@ cell_port_list_rules: cell_port | cell_port_list_rules ',' cell_port; cell_port: - /* empty */ { + attr { AstNode *node = new AstNode(AST_ARGUMENT); astbuf2->children.push_back(node); } | - expr { + attr expr { AstNode *node = new AstNode(AST_ARGUMENT); astbuf2->children.push_back(node); - node->children.push_back($1); + node->children.push_back($2); } | - '.' TOK_ID '(' expr ')' { + attr '.' TOK_ID '(' expr ')' { AstNode *node = new AstNode(AST_ARGUMENT); - node->str = *$2; + node->str = *$3; astbuf2->children.push_back(node); - node->children.push_back($4); - delete $2; + node->children.push_back($5); + delete $3; } | - '.' TOK_ID '(' ')' { + attr '.' TOK_ID '(' ')' { AstNode *node = new AstNode(AST_ARGUMENT); - node->str = *$2; + node->str = *$3; astbuf2->children.push_back(node); - delete $2; + delete $3; }; always_stmt: |