diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2012-04-29 17:51:51 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2012-04-29 17:51:51 (GMT) |
commit | 44ca9512aaeb19f7fbd07afda88ec4cfe53ce831 (patch) | |
tree | a8d7cbd0da612bb0b1fa97dcc1bac1838f845338 /src/vhdlscanner.l | |
parent | f3e0c94b327d47e5c3d3a36a9a6300cee8d2a537 (diff) | |
download | Doxygen-44ca9512aaeb19f7fbd07afda88ec4cfe53ce831.zip Doxygen-44ca9512aaeb19f7fbd07afda88ec4cfe53ce831.tar.gz Doxygen-44ca9512aaeb19f7fbd07afda88ec4cfe53ce831.tar.bz2 |
Release-1.8.0-20120429
Diffstat (limited to 'src/vhdlscanner.l')
-rw-r--r-- | src/vhdlscanner.l | 47 |
1 files changed, 40 insertions, 7 deletions
diff --git a/src/vhdlscanner.l b/src/vhdlscanner.l index 9ca68db..d757ea2 100644 --- a/src/vhdlscanner.l +++ b/src/vhdlscanner.l @@ -108,10 +108,18 @@ static void handleCommentBlock(const QCString &doc,bool brief); static void mapLibPackage(const Entry* ce); static Entry* getEntryAtLine(const Entry* ce,int line); static bool addLibUseClause(const QCString &type); - -static bool varr=false; +static Entry* oldEntry; +static bool varr=FALSE; static QCString varName; +static struct +{ + QCString doc; + bool brief; + bool pending; + int iDocLine; +} str_doc; + #define YY_NEVER_INTERACTIVE 1 #define YY_USER_ACTION num_chars += vhdlScanYYleng; @@ -537,7 +545,7 @@ BR [ \t\n\r] . { /* unknown characters */ } -<*>{B}*"--!"[^{}\n][^\n]*\n/{B}*"--!" { // multi line comment +<*>{BR}*"--!"[^{}\n][^\n]*\n/{B}*"--!" { // multi line comment if (iDocLine==-1) iDocLine=yyLineNr; QCString qc(vhdlScanYYtext); int len=qc.contains('\n')+yyLineNr-1; @@ -572,7 +580,7 @@ BR [ \t\n\r] if (index>0) { startCodeBlock(index); - doxComment=true; + doxComment=TRUE; } lineCount(); BEGIN(Comment); @@ -596,7 +604,7 @@ BR [ \t\n\r] } strComment.resize(0);; unput(*vhdlScanYYtext); - doxComment=false; + doxComment=FALSE; BEGIN(g_lastCommentContext); } @@ -745,7 +753,7 @@ bool VHDLLanguageScanner::needsPreprocessing(const QCString & /*extension*/) void VHDLLanguageScanner::parsePrototype(const char *text) { varName=text; - varr=true; + varr=TRUE; } // do parsing @@ -914,12 +922,28 @@ static bool addLibUseClause(const QCString &type) static void handleCommentBlock(const QCString &doc,bool brief) { int position=0; + + // empty comment --! + if (doc.isEmpty()) return; + bool needsEntry=FALSE; Protection protection=Public; int lineNr = iDocLine; Entry* current=getCurrentVhdlEntry(); + if (oldEntry==current) + { + //printf("\n find pending message < %s > at line: %d \n ",doc.data(),iDocLine); + str_doc.doc=doc; + str_doc.iDocLine=iDocLine; + str_doc.brief=brief; + str_doc.pending=TRUE; + return; + } + + oldEntry=current; + if (brief) current->briefLine = iDocLine; else @@ -948,7 +972,7 @@ static void handleCommentBlock(const QCString &doc,bool brief) { if(varr) { - varr=false; + varr=FALSE; current->name=varName; current->section=Entry::VARIABLEDOC_SEC; varName=""; @@ -988,4 +1012,13 @@ int getParsedLine(int object) return lineIndex [object]; } +void isVhdlDocPending() +{ + if (!str_doc.pending) + return; + iDocLine=str_doc.iDocLine; + handleCommentBlock(str_doc.doc,str_doc.brief); + iDocLine=-1; + str_doc.pending=FALSE; +} |