Internals: Favor idAny in typedefs.
This commit is contained in:
parent
f4f8ea0dcf
commit
18fc3e6089
|
|
@ -2591,15 +2591,10 @@ type_declaration<nodep>: // ==IEEE: type_declaration
|
||||||
AstNodeDType* const dtp = GRAMMARP->createArray(refp, $4, true);
|
AstNodeDType* const dtp = GRAMMARP->createArray(refp, $4, true);
|
||||||
$$ = GRAMMARP->createTypedef($<fl>5, *$5, $7, dtp, $6); }
|
$$ = GRAMMARP->createTypedef($<fl>5, *$5, $7, dtp, $6); }
|
||||||
// //
|
// //
|
||||||
| yTYPEDEF id/*interface*/ '.' idAny/*type*/ idAny/*type*/ dtypeAttrListE ';'
|
| yTYPEDEF idAny/*interface*/ '.' idAny/*type*/ idAny/*type*/ dtypeAttrListE ';'
|
||||||
{ $$ = nullptr; BBUNSUP($1, "Unsupported: SystemVerilog 2005 typedef in this context"); }
|
{ $$ = nullptr; BBUNSUP($1, "Unsupported: SystemVerilog 2005 typedef in this context"); }
|
||||||
// // Allow redeclaring same typedef again
|
// // idAny as also allows redeclaring same typedef again
|
||||||
// // Alternative is use of idAny below, but this will cause conflicts with ablve
|
| yTYPEDEF idAny ';' { $$ = GRAMMARP->createTypedefFwd($<fl>2, *$2); }
|
||||||
| yTYPEDEF idType ';' { $$ = GRAMMARP->createTypedefFwd($<fl>2, *$2); }
|
|
||||||
// // Combines into above "data_type id" rule
|
|
||||||
// // Verilator: Not important what it is in the AST, just need
|
|
||||||
// // to make sure the yaID__aTYPE gets returned
|
|
||||||
| yTYPEDEF id ';' { $$ = GRAMMARP->createTypedefFwd($<fl>2, *$2); }
|
|
||||||
// // IEEE: expanded forward_type to prevent conflict
|
// // IEEE: expanded forward_type to prevent conflict
|
||||||
| yTYPEDEF yENUM idAny ';' { $$ = GRAMMARP->createTypedefFwd($<fl>3, *$3); }
|
| yTYPEDEF yENUM idAny ';' { $$ = GRAMMARP->createTypedefFwd($<fl>3, *$3); }
|
||||||
| yTYPEDEF ySTRUCT idAny ';' { $$ = GRAMMARP->createTypedefFwd($<fl>3, *$3); }
|
| yTYPEDEF ySTRUCT idAny ';' { $$ = GRAMMARP->createTypedefFwd($<fl>3, *$3); }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue