Rework parser and add V3LinkParse so we can handle foo[#].foo[#].foo[#:#] etc

git-svn-id: file://localhost/svn/verilator/trunk/verilator@862 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
Wilson Snyder
2006-12-21 21:53:51 +00:00
parent 94d0aa2058
commit 58b1ad1439
11 changed files with 446 additions and 80 deletions
+18 -2
View File
@@ -97,6 +97,18 @@ private:
m_ftaskp = NULL;
}
virtual void visit(AstSenItem* nodep, AstNUser*) {
// Remove bit selects, and bark if it's not a simple variable
nodep->iterateChildren(*this);
if (AstSel* selp = nodep->sensp()->castSel()) {
AstNode* fromp = selp->fromp()->unlinkFrBack();
selp->replaceWith(fromp); selp->deleteTree(); selp=NULL;
}
if (!nodep->sensp()->castNodeVarRef()) {
nodep->v3error("Unsupported: Complex statement in sensitivity list");
}
}
void iterateSelTriop(AstNodePreSel* nodep) {
nodep->iterateChildren(*this);
}
@@ -284,11 +296,15 @@ private:
}
virtual void visit(AstFOpen* nodep, AstNUser*) {
nodep->iterateChildren(*this);
expectDescriptor(nodep, nodep->filep());
expectDescriptor(nodep, nodep->filep()->castNodeVarRef());
}
virtual void visit(AstFClose* nodep, AstNUser*) {
nodep->iterateChildren(*this);
expectDescriptor(nodep, nodep->filep());
expectDescriptor(nodep, nodep->filep()->castNodeVarRef());
}
virtual void visit(AstDisplay* nodep, AstNUser*) {
nodep->iterateChildren(*this);
if (nodep->filep()) expectDescriptor(nodep, nodep->filep()->castNodeVarRef());
}
virtual void visit(AstScCtor* nodep, AstNUser*) {