summaryrefslogtreecommitdiffstats
path: root/src/scanner.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2000-03-19 17:44:21 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2000-03-19 17:44:21 (GMT)
commit92fa8641e981d7a6e9f5d2c7e16e8ffbe78d06fe (patch)
treecf16207c2ec24e065b19418ceabdc18560052288 /src/scanner.l
parent2c5c887899dcce964bbed13a3d022efc26fa2b46 (diff)
downloadDoxygen-92fa8641e981d7a6e9f5d2c7e16e8ffbe78d06fe.zip
Doxygen-92fa8641e981d7a6e9f5d2c7e16e8ffbe78d06fe.tar.gz
Doxygen-92fa8641e981d7a6e9f5d2c7e16e8ffbe78d06fe.tar.bz2
Release 1.1.1-20000319
Diffstat (limited to 'src/scanner.l')
-rw-r--r--src/scanner.l35
1 files changed, 33 insertions, 2 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 6868c56..c5dc210 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -151,6 +151,7 @@ static QCString formulaText;
static QCString sectionRef;
static bool insideIDL = FALSE;
static bool insideCppQuote = FALSE;
+static int depthIf;
// state variable for reading the argument list of a function
static int argRoundCount;
@@ -1001,6 +1002,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
%x DocEmphasis
%x DocBold
%x DocCode
+%x DocIf
%x DocCodeBlock
%x DocInternal
%x DocLink
@@ -1584,6 +1586,29 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
<DocScan>{CMD}"refitem" {
BEGIN(DocRefItem);
}
+<DocScan>{CMD}"if"/{BN} {
+ outDoc->pushGeneratorState();
+ depthIf++;
+ BEGIN(DocIf);
+ }
+<DocScan>{CMD}"endif"/[^a-z_A-Z0-9] {
+ if (--depthIf<0)
+ {
+ warn("Warning: documentation block contains \\endif without "
+ "matching \\if found in documentation of %s!",refName.data());
+ }
+ else
+ {
+ outDoc->popGeneratorState();
+ }
+ }
+<DocIf>[^\n\t ]+ {
+ if (Config::sectionFilterList.find(yytext)==-1)
+ {
+ outDoc->disableAll();
+ }
+ BEGIN(DocScan);
+ }
<DocRefName>{SCOPENAME} {
QCString ref=yytext;
SectionInfo *sec;
@@ -4153,7 +4178,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
);
BEGIN(lastMemberGroupContext);
}
-<Doc,PageDoc,JavaDoc,ClassDoc>{CMD}"anchor"{B}+ {
+<ExampleDoc,Doc,PageDoc,JavaDoc,ClassDoc>{CMD}"anchor"{B}+ {
lastAnchorContext = YY_START;
sectionType=SectionInfo::Anchor;
BEGIN(AnchorLabel);
@@ -4261,7 +4286,8 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
<ExampleDoc,PageDoc,ClassDoc>[a-z_A-Z0-9 \t]+ { current->doc += yytext; }
<ExampleDoc,PageDoc,ClassDoc>. { current->doc += yytext; }
<Doc,JavaDoc,LineDoc,ExampleDoc,PageDoc,ClassDoc>^{B}*"//"
-<Doc,JavaDoc,LineDoc,ExampleDoc,PageDoc,ClassDoc>"//" { current->doc += yytext; }
+<Doc,ExampleDoc,PageDoc,ClassDoc>"//" { current->doc += yytext; }
+<LineDoc,JavaDoc>"//" { current->brief += yytext; }
<Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc>("\\\\"|"@@")"f"[$\[\]] {
current->doc += &yytext[1];
}
@@ -4695,6 +4721,7 @@ void parseDocument(OutputList &ol,const QCString &docString)
{
//inParamBlock=inSeeBlock=inReturnBlock=FALSE;
curTable = 0;
+ depthIf = 0;
outDoc = new OutputList(&ol);
currentIncludeFile.resize(0);
includeFileOffset=0;
@@ -4732,6 +4759,10 @@ void parseDocument(OutputList &ol,const QCString &docString)
"of a list (indent level %d)!\n",currentListIndentLevel);
}
}
+ if (depthIf!=0)
+ {
+ warn("Warning: Documentation block contains \\if without matching \\endif: %d\n",depthIf);
+ }
ol+=*outDoc;
delete outDoc; outDoc=0;
return;