Skip to content

Commit d6c3627

Browse files
committed
Internals: Align associative parsing with Verilator.
1 parent 8bd774c commit d6c3627

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Parser/VParseBison.y

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,9 +1603,10 @@ variable_dimension<str>: // ==IEEE: variable_dimension
16031603
'[' ']' { $<fl>$=$<fl>1; $$=""; }
16041604
// // IEEE: unpacked_dimension
16051605
| anyrange { $<fl>$=$<fl>1; $$=$1; }
1606-
| '[' constExpr ']' { $<fl>$=$<fl>1; $$="["+$2+"]"; }
1607-
// // IEEE: associative_dimension
1608-
| '[' data_type ']' { $<fl>$=$<fl>1; $$="["+$2+"]"; }
1606+
// // IEEE: unpacked_dimension (if const_expr)
1607+
// // IEEE: associative_dimension (if data_type)
1608+
// // Can't tell which until see if expr is data type or not
1609+
| '[' exprOrDataType ']' { $<fl>$=$<fl>1; $$="["+$2+"]"; }
16091610
| yP_BRASTAR ']' { $<fl>$=$<fl>1; $$="[*]"; }
16101611
| '[' '*' ']' { $<fl>$=$<fl>1; $$="[*]"; }
16111612
// // IEEE: queue_dimension

0 commit comments

Comments
 (0)