From 63060dcd2e36b9e0964953214ef01466296f4d29 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 13 Nov 2013 15:30:23 +0100 Subject: [PATCH] Fixed parsing of "parameter integer" --- frontends/verilog/parser.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontends/verilog/parser.y b/frontends/verilog/parser.y index 666948987..17f14d541 100644 --- a/frontends/verilog/parser.y +++ b/frontends/verilog/parser.y @@ -386,8 +386,8 @@ param_integer: if (astbuf1->children.size() != 1) frontend_verilog_yyerror("Syntax error."); astbuf1->children.push_back(new AstNode(AST_RANGE)); - astbuf1->children[0]->children.push_back(AstNode::mkconst_int(31, true)); - astbuf1->children[0]->children.push_back(AstNode::mkconst_int(0, true)); + astbuf1->children.back()->children.push_back(AstNode::mkconst_int(31, true)); + astbuf1->children.back()->children.push_back(AstNode::mkconst_int(0, true)); } | /* empty */; param_range: -- 2.30.2