From 17a9b22dce5a89609ea2ea6bd34213c90ad8a5e7 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Tue, 21 Mar 2017 19:17:15 -0400 Subject: [PATCH] Fix cell ranges without colons. --- src/verilog.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/verilog.y b/src/verilog.y index a7750a909..0b3f3ec3f 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -2074,7 +2074,7 @@ instnameParen: instRangeE: /* empty */ { $$ = NULL; } - | '[' constExpr ']' { $$ = new AstRange($1,new AstConst($1,0),$2); } + | '[' constExpr ']' { $$ = new AstRange($1, new AstConst($1, 0), new AstSub($1, $2, new AstConst($1, 1))); } | '[' constExpr ':' constExpr ']' { $$ = new AstRange($1,$2,$4); } ;