diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2008-01-23 21:30:39 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2008-01-23 21:30:39 (GMT) |
commit | 38c6a14b15d87348076be142abea8663009ace82 (patch) | |
tree | d75127a33593cfe4d77e951e6df541294dc1e9b4 /src/vhdldocgen.cpp | |
parent | d37b4be374f200ce57ee228d0f33e52e10add15f (diff) | |
download | Doxygen-38c6a14b15d87348076be142abea8663009ace82.zip Doxygen-38c6a14b15d87348076be142abea8663009ace82.tar.gz Doxygen-38c6a14b15d87348076be142abea8663009ace82.tar.bz2 |
Release-1.5.4-20080123
Diffstat (limited to 'src/vhdldocgen.cpp')
-rw-r--r-- | src/vhdldocgen.cpp | 67 |
1 files changed, 42 insertions, 25 deletions
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 60a49b1..0fbd1b4 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -144,13 +144,13 @@ QCString* VhdlDocGen::findKeyWord(const QCString& word) if (word.isEmpty() || word.at(0)=='\0') return 0; //printf("VhdlDocGen::findKeyWord(%s)\n",word.data()); - if (g_vhdlKeyDict0.find(word)) + if (g_vhdlKeyDict0.find(word.lower())) return &g_vhdlkeyword; - if (g_vhdlKeyDict1.find(word)) + if (g_vhdlKeyDict1.find(word.lower())) return &g_vhdltype; - if (g_vhdlKeyDict2.find(word)) + if (g_vhdlKeyDict2.find(word.lower())) return &g_vhdllogic; return 0; @@ -832,21 +832,23 @@ bool VhdlDocGen::getSigTypeName(QList<QCString>& ql, const char* str,QCString& b bool VhdlDocGen::getSigName(QList<QCString>& ql, const char* str,QCString& buffer) { - int len,j,ll,index; + int j,ll,index; char *signal = "signal "; QCString qmem; QCString temp(str); QCString st(str); - QRegExp semi(","); - QRegExp r(":"); - j = r.match(temp.data(),0,&len); + //QRegExp semi(","); + //QRegExp r(":"); + + // colon position + j = temp.find(':'); if (j < 0) return FALSE; // no input definition - st=st.left(j); + st=st.left(j); // name only index=st.find(signal,0,FALSE); - if (index > -1) + if (index > -1) // found "signal " { - qmem=st.remove(index,strlen(signal)); + qmem=st.remove(index,strlen(signal)); // strip it temp=qmem; st=qmem; } @@ -855,56 +857,71 @@ bool VhdlDocGen::getSigName(QList<QCString>& ql, qmem=temp; } - ll=semi.match(st.data(),0,&len); + ll=st.find(','); - if (ll>0) + if (ll>0) // multiple names { while (TRUE) { - st=st.left(ll); + st=st.left(ll).stripWhiteSpace(); // one name + QCString *sig =new QCString(st); ql.insert(0,sig); - qmem=qmem.right(qmem.length()-ll-1); - st=qmem; - ll=semi.match(st.data(),0,&len); - if (ll<0) + qmem=qmem.right(qmem.length()-ll-1); // strip from list + st=qmem; // remainder + ll=st.find(','); + if (ll<0) // last name { - ll = r.match(st.data(),0,&len); - st=st.left(ll); + ll = st.find(':'); + st=st.left(ll).stripWhiteSpace(); ql.insert(0,new QCString(st)); break; } } } - else + else // single name { - st=st.left(j); + st=st.stripWhiteSpace(); ql.insert(0,new QCString(st)); } QCString *qdir=new QCString(str); - st=qdir->mid(j+1); - //st=st.lower(); - st=st.stripWhiteSpace(); + st=qdir->mid(j+1); // part after : + st=st.lower().stripWhiteSpace(); *qdir=st; - ql.insert(0,qdir); + if (st.stripPrefix("inout")) { buffer+="inout"; return TRUE; } + if (st.stripPrefix("INOUT")) + { + buffer+="inout"; + return TRUE; + } if (st.stripPrefix("out")) { buffer+="out"; return TRUE; } + if (st.stripPrefix("OUT")) + { + buffer+="out"; + return TRUE; + } if (st.stripPrefix("in")) { buffer+="in"; return TRUE; } + if (st.stripPrefix("IN")) + { + buffer+="in"; + return TRUE; + } return FALSE; } |