Fix cell ranges without colons.

This commit is contained in:
Wilson Snyder 2017-03-21 19:17:15 -04:00
parent f190d12802
commit 17a9b22dce

View File

@ -2074,7 +2074,7 @@ instnameParen<cellp>:
instRangeE<rangep>:
/* 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); }
;