3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-13 04:28:18 +00:00

Added support for parsing attributes on port connections.

Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
This commit is contained in:
Maciej Kurc 2019-05-31 12:24:12 +02:00
parent 90ec2cda42
commit a6cadf6318

View file

@ -1532,27 +1532,27 @@ cell_port_list_rules:
cell_port | cell_port_list_rules ',' cell_port; cell_port | cell_port_list_rules ',' cell_port;
cell_port: cell_port:
/* empty */ { attr {
AstNode *node = new AstNode(AST_ARGUMENT); AstNode *node = new AstNode(AST_ARGUMENT);
astbuf2->children.push_back(node); astbuf2->children.push_back(node);
} | } |
expr { attr expr {
AstNode *node = new AstNode(AST_ARGUMENT); AstNode *node = new AstNode(AST_ARGUMENT);
astbuf2->children.push_back(node); 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); AstNode *node = new AstNode(AST_ARGUMENT);
node->str = *$2; node->str = *$3;
astbuf2->children.push_back(node); astbuf2->children.push_back(node);
node->children.push_back($4); node->children.push_back($5);
delete $2; delete $3;
} | } |
'.' TOK_ID '(' ')' { attr '.' TOK_ID '(' ')' {
AstNode *node = new AstNode(AST_ARGUMENT); AstNode *node = new AstNode(AST_ARGUMENT);
node->str = *$2; node->str = *$3;
astbuf2->children.push_back(node); astbuf2->children.push_back(node);
delete $2; delete $3;
}; };
always_stmt: always_stmt: