Parser: Move scoped id unsupported messages down out of parser
This commit is contained in:
parent
9e5cd463e5
commit
f0a6e4c2b2
|
|
@ -2697,6 +2697,8 @@ private:
|
||||||
"Unsupported: Multiple '::' package/class reference");
|
"Unsupported: Multiple '::' package/class reference");
|
||||||
}
|
}
|
||||||
VL_DO_DANGLING(cpackagep->unlinkFrBack()->deleteTree(), cpackagep);
|
VL_DO_DANGLING(cpackagep->unlinkFrBack()->deleteTree(), cpackagep);
|
||||||
|
} else if (nodep->paramsp()) {
|
||||||
|
nodep->v3warn(E_UNSUPPORTED, "Unsupported: parameterized packages");
|
||||||
}
|
}
|
||||||
if (m_ds.m_dotp && m_ds.m_dotPos == DP_PACKAGE) {
|
if (m_ds.m_dotp && m_ds.m_dotPos == DP_PACKAGE) {
|
||||||
UASSERT_OBJ(VN_IS(m_ds.m_dotp->lhsp(), ClassOrPackageRef), m_ds.m_dotp->lhsp(),
|
UASSERT_OBJ(VN_IS(m_ds.m_dotp->lhsp(), ClassOrPackageRef), m_ds.m_dotp->lhsp(),
|
||||||
|
|
|
||||||
|
|
@ -1794,7 +1794,6 @@ data_type<dtypep>: // ==IEEE: data_type
|
||||||
$$ = GRAMMARP->createArray(refp, $3, true); }
|
$$ = GRAMMARP->createArray(refp, $3, true); }
|
||||||
| packageClassScopeE idType parameter_value_assignmentClass packed_dimensionListE
|
| packageClassScopeE idType parameter_value_assignmentClass packed_dimensionListE
|
||||||
{ AstRefDType* refp = new AstRefDType($<fl>2, *$2, $1, $3);
|
{ AstRefDType* refp = new AstRefDType($<fl>2, *$2, $1, $3);
|
||||||
BBUNSUP($3->fileline(), "Unsupported: Parameter classes");
|
|
||||||
$$ = GRAMMARP->createArray(refp, $4, true); }
|
$$ = GRAMMARP->createArray(refp, $4, true); }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
@ -4729,7 +4728,7 @@ idClassSel<nodep>: // Misc Ref to dotted, and/or arrayed, and/or bit-ranged va
|
||||||
{ $$ = new AstDot($2, false, new AstParseRef($<fl>1, VParseRefExp::PX_ROOT, "super"), $3); }
|
{ $$ = new AstDot($2, false, new AstParseRef($<fl>1, VParseRefExp::PX_ROOT, "super"), $3); }
|
||||||
| yTHIS '.' ySUPER '.' idDotted { $$ = $5; BBUNSUP($1, "Unsupported: this.super"); }
|
| yTHIS '.' ySUPER '.' idDotted { $$ = $5; BBUNSUP($1, "Unsupported: this.super"); }
|
||||||
// // Expanded: package_scope idDotted
|
// // Expanded: package_scope idDotted
|
||||||
| packageClassScope idDotted { $$ = $2; BBUNSUP($2, "Unsupported: package scoped id"); }
|
| packageClassScope idDotted { $$ = new AstDot($<fl>2, true, $1, $2); }
|
||||||
;
|
;
|
||||||
|
|
||||||
idClassSelForeach<nodep>:
|
idClassSelForeach<nodep>:
|
||||||
|
|
@ -4741,7 +4740,7 @@ idClassSelForeach<nodep>:
|
||||||
{ $$ = new AstDot($2, false, new AstParseRef($<fl>1, VParseRefExp::PX_ROOT, "super"), $3); }
|
{ $$ = new AstDot($2, false, new AstParseRef($<fl>1, VParseRefExp::PX_ROOT, "super"), $3); }
|
||||||
| yTHIS '.' ySUPER '.' idDottedForeach { $$ = $5; BBUNSUP($1, "Unsupported: this.super"); }
|
| yTHIS '.' ySUPER '.' idDottedForeach { $$ = $5; BBUNSUP($1, "Unsupported: this.super"); }
|
||||||
// // Expanded: package_scope idForeach
|
// // Expanded: package_scope idForeach
|
||||||
| packageClassScope idDottedForeach { $$ = $2; BBUNSUP($2, "Unsupported: package/class scoped id"); }
|
| packageClassScope idDottedForeach { $$ = new AstDot($<fl>2, true, $1, $2); }
|
||||||
;
|
;
|
||||||
|
|
||||||
idDotted<nodep>:
|
idDotted<nodep>:
|
||||||
|
|
@ -4772,7 +4771,8 @@ idDottedMoreForeach<nodep>:
|
||||||
// id below includes:
|
// id below includes:
|
||||||
// enum_identifier
|
// enum_identifier
|
||||||
idArrayed<nodep>: // IEEE: id + select
|
idArrayed<nodep>: // IEEE: id + select
|
||||||
id { $$ = new AstParseRef($<fl>1, VParseRefExp::PX_TEXT, *$1, NULL, NULL); }
|
id
|
||||||
|
{ $$ = new AstParseRef($<fl>1, VParseRefExp::PX_TEXT, *$1, NULL, NULL); }
|
||||||
// // IEEE: id + part_select_range/constant_part_select_range
|
// // IEEE: id + part_select_range/constant_part_select_range
|
||||||
| idArrayed '[' expr ']' { $$ = new AstSelBit($2, $1, $3); } // Or AstArraySel, don't know yet.
|
| idArrayed '[' expr ']' { $$ = new AstSelBit($2, $1, $3); } // Or AstArraySel, don't know yet.
|
||||||
| idArrayed '[' constExpr ':' constExpr ']' { $$ = new AstSelExtract($2, $1, $3, $5); }
|
| idArrayed '[' constExpr ':' constExpr ']' { $$ = new AstSelExtract($2, $1, $3, $5); }
|
||||||
|
|
@ -4782,7 +4782,8 @@ idArrayed<nodep>: // IEEE: id + select
|
||||||
;
|
;
|
||||||
|
|
||||||
idArrayedForeach<nodep>: // IEEE: id + select (under foreach expression)
|
idArrayedForeach<nodep>: // IEEE: id + select (under foreach expression)
|
||||||
id { $$ = new AstParseRef($<fl>1, VParseRefExp::PX_TEXT, *$1, NULL, NULL); }
|
id
|
||||||
|
{ $$ = new AstParseRef($<fl>1, VParseRefExp::PX_TEXT, *$1, NULL, NULL); }
|
||||||
// // IEEE: id + part_select_range/constant_part_select_range
|
// // IEEE: id + part_select_range/constant_part_select_range
|
||||||
| idArrayed '[' expr ']' { $$ = new AstSelBit($2, $1, $3); } // Or AstArraySel, don't know yet.
|
| idArrayed '[' expr ']' { $$ = new AstSelBit($2, $1, $3); } // Or AstArraySel, don't know yet.
|
||||||
| idArrayed '[' constExpr ':' constExpr ']' { $$ = new AstSelExtract($2, $1, $3, $5); }
|
| idArrayed '[' constExpr ':' constExpr ']' { $$ = new AstSelExtract($2, $1, $3, $5); }
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
%Error-UNSUPPORTED: t/t_class_param.v:20:11: Unsupported: Parameter classes
|
%Error-UNSUPPORTED: t/t_class_param.v:20:4: Unsupported: parameterized packages
|
||||||
20 | Cls #(.P(4)) c4;
|
20 | Cls #(.P(4)) c4;
|
||||||
| ^
|
| ^~~
|
||||||
|
%Error-UNSUPPORTED: t/t_class_param.v:9:23: Unsupported: class parameter
|
||||||
|
9 | class Cls #(parameter P = 12);
|
||||||
|
| ^
|
||||||
%Error: Exiting due to
|
%Error: Exiting due to
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
%Error-UNSUPPORTED: t/t_class_vparam_unsup.v:13:58: Unsupported: Parameter classes
|
%Error-UNSUPPORTED: t/t_class_vparam_unsup.v:13:40: Unsupported: parameterized packages
|
||||||
13 | pure virtual function void funcname(paramed_class_t #(CTYPE_t) v);
|
13 | pure virtual function void funcname(paramed_class_t #(CTYPE_t) v);
|
||||||
| ^~~~~~~
|
| ^~~~~~~~~~~~~~~
|
||||||
%Error: Exiting due to
|
%Error: Exiting due to
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue