@@ -2210,7 +2210,7 @@ mpInstnameParen: // Similar to instnameParen, but for modport instantiations wh
22102210
22112211mpInstname: // Similar to instname, but for modport instantiations which have no parenthesis
22122212 // // id is-a: interface_port_identifier (interface.modport)
2213- id instRangeE { PARSEP->instantCb ($<fl>1 , GRAMMARP->m_cellMod , $1 , $2 ); }
2213+ id instRangeListE { PARSEP->instantCb ($<fl>1 , GRAMMARP->m_cellMod , $1 , $2 ); }
22142214 ;
22152215
22162216instnameList:
@@ -2227,13 +2227,22 @@ instname:
22272227 // // or instance_identifier (module)
22282228 // // or instance_identifier (program)
22292229 // // or udp_instance (udp)
2230- id instRangeE ' (' { PARSEP->instantCb ($<fl>1 , GRAMMARP->m_cellMod , $1 , $2 ); PINPARAMS (); }
2231- | instRangeE ' (' { PARSEP->instantCb ($<fl>2 , GRAMMARP->m_cellMod , " " , $1 ); PINPARAMS (); } // UDP
2230+ id instRangeListE ' (' { PARSEP->instantCb ($<fl>1 , GRAMMARP->m_cellMod , $1 , $2 ); PINPARAMS (); }
2231+ | instRangeListE ' (' { PARSEP->instantCb ($<fl>2 , GRAMMARP->m_cellMod , " " , $1 ); PINPARAMS (); } // UDP
22322232 ;
22332233
2234- instRangeE <str>:
2234+ instRangeListE <str>:
22352235 /* empty */ { $$ = " " ; }
2236- | ' [' constExpr ' ]' { $<fl>$=$<fl>1 ; $$ = " [" +$2 +" ]" ; }
2236+ | instRangeList { $<fl>$=$<fl>1 ; $$ = $1 ; }
2237+ ;
2238+
2239+ instRangeList<str>:
2240+ instRange { $<fl>$=$<fl>1 ; $$ = $1 ; }
2241+ | instRangeList instRange { $<fl>$=$<fl>1 ; $$ = $1 +$2 ; }
2242+ ;
2243+
2244+ instRange<str>:
2245+ ' [' constExpr ' ]' { $<fl>$=$<fl>1 ; $$ = " [" +$2 +" ]" ; }
22372246 | ' [' constExpr ' :' constExpr ' ]' { $<fl>$=$<fl>1 ; $$ = " [" +$2 +" :" +$4 +" ]" ; }
22382247 ;
22392248
0 commit comments