summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2014-11-06 18:54:14 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2014-11-06 19:26:28 (GMT)
commit475b0c51847271b04cb0e58254bd7e420445250b (patch)
tree646a9b912d517bbb6b0e710d099e3d742e95fa79 /src
parente5076edf2c103d262a9e32d57fb40cfe210c9ddf (diff)
downloadDoxygen-475b0c51847271b04cb0e58254bd7e420445250b.zip
Doxygen-475b0c51847271b04cb0e58254bd7e420445250b.tar.gz
Doxygen-475b0c51847271b04cb0e58254bd7e420445250b.tar.bz2
Various VHDL fixes
Diffstat (limited to 'src')
-rw-r--r--src/classdef.cpp8
-rw-r--r--src/libdoxygen.pro.in2
-rw-r--r--src/vhdldocgen.cpp15
-rw-r--r--src/vhdljjparser.cpp91
4 files changed, 59 insertions, 57 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index d02dd5d..271634a 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -4234,7 +4234,13 @@ void ClassDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QC
MemberList * ml = getMemberList(lt);
MemberList * ml2 = getMemberList((MemberListType)lt2);
if (getLanguage()==SrcLangExt_VHDL) // use specific declarations function
- {
+ {
+ static ClassDef *cdef;
+ if (cdef!=this)
+ { // only one inline link
+ VhdlDocGen::writeInlineClassLink(this,ol);
+ cdef=this;
+ }
if (ml)
{
VhdlDocGen::writeVhdlDeclarations(ml,ol,0,this,0,0);
diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in
index c5943c6..7dbc74f 100644
--- a/src/libdoxygen.pro.in
+++ b/src/libdoxygen.pro.in
@@ -231,7 +231,7 @@ linux-g++:TMAKE_CXXFLAGS += -fno-exceptions
INCLUDEPATH += ../generated_src/doxygen ../src ../qtools ../libmd5 ../vhdlparser
INCLUDEPATH += %%SQLITE3_INC%%
INCLUDEPATH += %%LIBCLANG_INC%%
-DEPENDPATH += ../generated_src/doxygen
+DEPENDPATH += ../generated_src/doxygen ../qtools ../libmd5 ../vhdlparser
win32:INCLUDEPATH += .
DESTDIR = ../lib
TARGET = doxygen
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index 50127f8..a4e9906 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -1785,21 +1785,6 @@ QCString VhdlDocGen::convertArgumentListToString(const ArgumentList* al,bool fun
void VhdlDocGen::writeVhdlDeclarations(MemberList* ml,
OutputList& ol,GroupDef* gd,ClassDef* cd,FileDef *fd,NamespaceDef* nd)
{
- static ClassDef *cdef;
- //static GroupDef* gdef;
- if (cd && cdef!=cd)
- { // only one inline link
- VhdlDocGen::writeInlineClassLink(cd,ol);
- cdef=cd;
- }
-
- /*
- if (gd && gdef==gd) return;
- if (gd && gdef!=gd)
- {
- gdef=gd;
- }
- */
VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::LIBRARY,FALSE),0,FALSE,VhdlDocGen::LIBRARY);
VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::USE,FALSE),0,FALSE,VhdlDocGen::USE);
VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::FUNCTION,FALSE),0,FALSE,VhdlDocGen::FUNCTION);
diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp
index d79c260..7b0c112 100644
--- a/src/vhdljjparser.cpp
+++ b/src/vhdljjparser.cpp
@@ -42,26 +42,6 @@ static int iDocLine = -1;
static QCString inputString;
static Entry gBlock;
static Entry* previous = 0;
-#if 0
-int iLine;
-QStringList qrl;
-ParserInterface *g_thisParser;
-int inputPosition;
-int inputLen;
-int startComment = 0;
-QFile inputFile;
-QCString inbuf;
-
-QCString yyFileName;
-bool g_lexInit = FALSE;
-int yyLineNr = 1;
-int g_lastCommentContext = 0;
-bool docBlockAutoBrief;
-char docBlockTerm;
-int iDocLine = -1;
-int num_chars;
-int* lineParse;
-#endif
//-------------------------------------------------------
static Entry* oldEntry;
@@ -124,7 +104,6 @@ void startCodeBlock(int index)
int ll=strComment.length();
iCodeLen=inputString.findRev(strComment.data())+ll;
// fprintf(stderr,"\n startin code..%d %d %d\n",iCodeLen,num_chars,ll);
- //assert(false);
gBlock.reset();
int len=strComment.length();
QCString name=strComment.right(len-index);//
@@ -134,8 +113,6 @@ void startCodeBlock(int index)
else
gBlock.name=name;
- //int li=strComment.contains('\n');
-
gBlock.startLine=yyLineNr;
gBlock.bodyLine=yyLineNr;
@@ -232,7 +209,10 @@ void VHDLLanguageScanner::parseInput(const char *fileName,const char *fileBuf,En
VhdlDocGen::resetCodeVhdlParserState();
}
-void VhdlParser::lineCount(){ yyLineNr++; }
+void VhdlParser::lineCount()
+{
+ yyLineNr++;
+}
void VhdlParser::lineCount(const char* text)
{
@@ -309,7 +289,6 @@ bool checkInlineCode(QCString & doc)
void VhdlParser::handleFlowComment(const char* doc)
{
- lineCount(doc);
if (VhdlDocGen::getFlowMember())
{
QCString qcs(doc);
@@ -319,6 +298,7 @@ void VhdlParser::handleFlowComment(const char* doc)
}
}
+
void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
{
int position=0;
@@ -328,7 +308,7 @@ void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
if (checkMultiComment(doc,yyLineNr))
{
- lineCount(doc1);
+ strComment.resize(0);
return;
}
@@ -345,7 +325,6 @@ void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
if (isIn)
{
isIn=false;
- lineCount(doc1);
return;
}
@@ -353,7 +332,9 @@ void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
bool needsEntry=FALSE;
Protection protection=Public;
- int lineNr = iDocLine;
+ int lineNr;
+ if (iDocLine==-1)
+ lineNr=yyLineNr;
if (oldEntry==current)
{
@@ -375,13 +356,13 @@ void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
{
current->docLine = yyLineNr;
}
- // printf("parseCommentBlock file<%s>\n [%s]\n",yyFileName.data(),doc.data());
+ // printf("parseCommentBlock file<%s>\n [%s]\n at line [%d] \n ",yyFileName.data(),doc.data(),iDocLine);
while (parseCommentBlock(
g_thisParser,
current,
doc, // text
yyFileName, // file
- lineNr, // line of block start
+ iDocLine, // line of block start
brief,
0,
FALSE,
@@ -405,7 +386,8 @@ void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
}
newEntry();
}
- lineCount(doc1);
+ iDocLine=-1;
+ strComment.resize(0);
}
void VHDLLanguageScanner::parsePrototype(const char *text)
@@ -571,12 +553,10 @@ void VhdlParser::addConfigureNode(const char* a,const char*b, bool,bool isLeaf,b
QCString ent,arch,lab;
QCString l=genLabels;
ent=a;
- // lab = VhdlDocGen::parseForConfig(ent,arch);
if (b)
{
ent=b;
- // lab=VhdlDocGen::parseForBinding(ent,arch);
}
int level=0;
@@ -619,8 +599,7 @@ void VhdlParser::addConfigureNode(const char* a,const char*b, bool,bool isLeaf,b
}
configL.append(co);
-
-}// addConfigure
+}
void VhdlParser::addProto(const char *s1,const char *s2,const char *s3,
@@ -788,23 +767,55 @@ void VhdlParser::createFlow()
currP=0;
}
+void VhdlParser::setMultCommentLine()
+{
+ iDocLine=yyLineNr;
+}
+
+void VhdlParser::oneLineComment(QCString qcs)
+{
+ bool isEndCode=qcs.contains("\\endcode");
+
+ int index = qcs.find("\\code");
+ if (isEndCode)
+ {
+ int end = inputString.find(qcs.data(),iCodeLen);
+ makeInlineDoc(end);
+ }
+ else if (index > 0)
+ {
+ // assert(false);
+ strComment=qcs;
+ startCodeBlock(index);
+ strComment.resize(0);
+ }
+
+ if (!isEndCode && index==-1)
+ {
+ int j=qcs.find("--!");
+ qcs=qcs.right(qcs.length()-3-j);
+ if (!checkMultiComment(qcs,iDocLine))
+ {
+ handleCommentBlock(qcs,TRUE);
+ }
+ }
+}
+
+
bool checkMultiComment(QCString& qcs,int line)
{
QList<Entry> *pTemp=getEntryAtLine(VhdlParser::current_root,line);
if (pTemp->isEmpty()) return false;
- //int ii=pTemp->count();
- // qcs.stripPrefix("--!");
VhdlDocGen::prepareComment(qcs);
while (!pTemp->isEmpty())
{
Entry *e=(Entry*)pTemp->getFirst();
e->briefLine=line;
e->brief+=qcs;
- iDocLine=-1;
+
pTemp->removeFirst();
- //ii=pTemp->count();
}
return true;
}
@@ -819,7 +830,7 @@ QList<Entry>* getEntryAtLine(const Entry* ce,int line)
if (rt->bodyLine==line)
{
lineEntry.insert(0,rt);
- } // if
+ }
getEntryAtLine(rt,line);
}