Permalink
Browse files

Various VHDL fixes

  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Nov 6, 2014
1 parent e5076ed commit 475b0c51847271b04cb0e58254bd7e420445250b
View
@@ -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);
View
@@ -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
View
@@ -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);
View
@@ -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,15 +325,16 @@ void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
if (isIn)
{
isIn=false;
lineCount(doc1);
return;
}
VhdlDocGen::prepareComment(doc);
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);
}
View
@@ -1,4 +1,4 @@
/* Generated By:JavaCC: Do not edit this line. CharStream.cc Version 6.0 */
/* Generated By:JavaCC: Do not edit this line. CharStream.cc Version 6.2 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
#include "CharStream.h"
@@ -209,4 +209,4 @@ void CharStream::UpdateLineColumn(JAVACC_CHAR_TYPE c) {
}
}
/* JavaCC - OriginalChecksum=e709b9ee1adf0fcb6b1c5e1641f10348 (do not edit this line) */
/* JavaCC - OriginalChecksum=ade3c1b57a731a003629de593814ffa6 (do not edit this line) */
Oops, something went wrong.

0 comments on commit 475b0c5

Please sign in to comment.