summaryrefslogtreecommitdiffstats
path: root/src/vhdlscanner.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2011-12-26 14:28:40 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2011-12-26 14:28:40 (GMT)
commit8a65c23b74c33c38b4d1234e76cec74bd08cea69 (patch)
tree7f59fc72959fc8ac950d4affd83be0c3b2b4cf2b /src/vhdlscanner.l
parentb625258a2f46f61e85bf473dfa64b719755c3b71 (diff)
downloadDoxygen-8a65c23b74c33c38b4d1234e76cec74bd08cea69.zip
Doxygen-8a65c23b74c33c38b4d1234e76cec74bd08cea69.tar.gz
Doxygen-8a65c23b74c33c38b4d1234e76cec74bd08cea69.tar.bz2
Release-1.7.6.1-20111226
Diffstat (limited to 'src/vhdlscanner.l')
-rw-r--r--src/vhdlscanner.l54
1 files changed, 35 insertions, 19 deletions
diff --git a/src/vhdlscanner.l b/src/vhdlscanner.l
index a2f2bd0..3212b75 100644
--- a/src/vhdlscanner.l
+++ b/src/vhdlscanner.l
@@ -28,7 +28,7 @@
*
* This file is intended not to be used for commercial purposes
* without permission of the University of Dortmund
- *
+ *
* NOTE THAT THERE IS NO WARRANTY FOR CORRECTNES, COMPLETENESS, SUPPORT
* OR ANYTHING ELSE.
*******************************************************/
@@ -285,6 +285,25 @@ static void lineCount()
}
+static void startCodeBlock(int index){
+ int ll=strComment.length();
+ iCodeLen=inputVhdlString.findRev(strComment.data(),num_chars)+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);//
+ name=VhdlDocGen::getIndexWord(name.data(),1);
+ if (!name)
+ gBlock.name="misc"+ VhdlDocGen::getRecordNumber();
+ else
+ gBlock.name=name;
+ strComment=strComment.left(index);
+ gBlock.startLine=yyLineNr+1;
+ gBlock.bodyLine=yyLineNr+1;
+ VhdlDocGen::prepareComment(strComment);
+ gBlock.brief+=strComment;
+}
static void makeInlineDoc(int endCode)
{
int len=endCode-iCodeLen;
@@ -309,7 +328,7 @@ static void makeInlineDoc(int endCode)
temp->type="misc"; // global code like library ieee...
current_root->addSubEntry(temp);
}
-
+ strComment.resize(0);
gBlock.reset();
@@ -531,7 +550,11 @@ BR [ \t\n\r]
<Comment>^{B}*"--!"[^\n]* {
if (iDocLine==-1) iDocLine=yyLineNr;
strComment+=vhdlScanYYtext;
-
+ int index=strComment.find("\\code");
+ if (index>0)
+ {
+ startCodeBlock(index);
+ }
lineCount();
}
@@ -541,22 +564,7 @@ BR [ \t\n\r]
int index =strComment.find("\\code");
if (index>0)
{
- int ll=strComment.length();
- iCodeLen=inputVhdlString.findRev(strComment.data(),num_chars)+ll;
-
- gBlock.reset();
- int len=strComment.length();
- QCString name=strComment.right(len-index);//
- name=VhdlDocGen::getIndexWord(name.data(),1);
- if (!name)
- gBlock.name="misc"+ VhdlDocGen::getRecordNumber();
- else
- gBlock.name=name;
- strComment=strComment.left(index);
- gBlock.startLine=yyLineNr+1;
- gBlock.bodyLine=yyLineNr+1;
- VhdlDocGen::prepareComment(strComment);
- gBlock.brief+=strComment;
+ startCodeBlock(index);
}
VhdlDocGen::prepareComment(strComment);
@@ -575,11 +583,19 @@ BR [ \t\n\r]
bool isEndCode=qcs.contains("\\endcode");
+ int index = qcs.find("\\code");
if (isEndCode)
{
int end=inputVhdlString.find(qcs.data(),iCodeLen);
makeInlineDoc(end);
}
+ else if (index > 0 )
+ {
+ // assert(false);
+ strComment=qcs;
+ startCodeBlock(index);
+ strComment.resize(0);
+ }
//printf("--> handleCommentBlock line %d\n",yyLineNr);
Entry* pTemp=getEntryAtLine(current_root,yyLineNr);