diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-03-10 10:29:24 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2020-03-10 10:29:24 -0700 |
commit | 2d63bf5877a99ad5a83be35b5bdc0702a947d456 (patch) | |
tree | 81fbc772fdc44c11e86d91b25e5a84461173f520 /frontends | |
parent | da8270aa01805c57ab833fc403db54045f11f276 (diff) | |
download | yosys-2d63bf5877a99ad5a83be35b5bdc0702a947d456.tar.gz yosys-2d63bf5877a99ad5a83be35b5bdc0702a947d456.tar.bz2 yosys-2d63bf5877a99ad5a83be35b5bdc0702a947d456.zip |
verilog: also set location for simple_behavioral_stmt
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/verilog/verilog_parser.y | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/frontends/verilog/verilog_parser.y b/frontends/verilog/verilog_parser.y index 0dd4e0f61..a558325c3 100644 --- a/frontends/verilog/verilog_parser.y +++ b/frontends/verilog/verilog_parser.y @@ -2113,18 +2113,22 @@ simple_behavioral_stmt: lvalue '=' delay expr { AstNode *node = new AstNode(AST_ASSIGN_EQ, $1, $4); ast_stack.back()->children.push_back(node); + SET_AST_NODE_LOC(node, @1, @4); } | lvalue TOK_INCREMENT { AstNode *node = new AstNode(AST_ASSIGN_EQ, $1, new AstNode(AST_ADD, $1->clone(), AstNode::mkconst_int(1, true))); ast_stack.back()->children.push_back(node); + SET_AST_NODE_LOC(node, @1, @2); } | lvalue TOK_DECREMENT { AstNode *node = new AstNode(AST_ASSIGN_EQ, $1, new AstNode(AST_SUB, $1->clone(), AstNode::mkconst_int(1, true))); ast_stack.back()->children.push_back(node); + SET_AST_NODE_LOC(node, @1, @2); } | lvalue OP_LE delay expr { AstNode *node = new AstNode(AST_ASSIGN_LE, $1, $4); ast_stack.back()->children.push_back(node); + SET_AST_NODE_LOC(node, @1, @4); }; // this production creates the obligatory if-else shift/reduce conflict |