Skip to content

Commit cabbc1e

Browse files
committed
Fix packages as enum base types, Verilator bug 2202.
1 parent a3d5403 commit cabbc1e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Changes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ indicates the contributor was also the author of the fix; Thanks!
88

99
**** Add error on misused define, #1659. [Topa Tota]
1010

11+
**** Fix packages as enum base types, Verilator bug 2202. [Driss Hafdi]
12+
1113

1214
* Verilog-Perl 3.470 2020-01-06
1315

Parser/VParseBison.y

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,7 +1652,11 @@ enum_base_typeE<str>: // IEEE: enum_base_type
16521652
| integer_vector_type signingE regrangeE { $<fl>$=$<fl>1; $$=SPACED($1,SPACED($2,$3)); }
16531653
// // below can be idAny or yaID__aTYPE
16541654
// // IEEE requires a type, though no shift conflict if idAny
1655+
// // IEEE: type_identifier [ packed_dimension ]
1656+
// // however other simulators allow [ class_scope | package_scope ] type_identifier
16551657
| idAny regrangeE { $<fl>$=$<fl>1; $$=SPACED($1,$2); }
1658+
| package_scopeIdFollows idAny rangeListE
1659+
{ $<fl>$=$<fl>1; $$ = $<str>1+$<str>2+$3; }
16561660
;
16571661

16581662
enum_nameList:

0 commit comments

Comments
 (0)