diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2000-02-20 17:34:13 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2000-02-20 17:34:13 (GMT) |
commit | b76d4ee1ec41101fffbef5d33c5a2ea70a6c6e54 (patch) | |
tree | f122ed1db8000e070cab7f8ad4c4af87b89adbe5 /src/scanner.l | |
parent | 8cc2d754b7ad3e3e88f4c1bb92878d8f517076e6 (diff) | |
download | Doxygen-b76d4ee1ec41101fffbef5d33c5a2ea70a6c6e54.zip Doxygen-b76d4ee1ec41101fffbef5d33c5a2ea70a6c6e54.tar.gz Doxygen-b76d4ee1ec41101fffbef5d33c5a2ea70a6c6e54.tar.bz2 |
+ The graphical class hierarchy was not properly generated when
template classes were used.
+ Template specialization could not be documented using the
\class command. This is now fixed. Example:
/*!
* \class T<A,int>
* My template specialization of template T.
*/
+ Fixed a bug when parsing M$-IDL code, containing
helpstring("bla") attributes. The attributes of a method are no longer
shown in the documentation (the attributes of method arguments
still visible however).
+ Improved the search algorithm that tries to connect classes with their
base classes. It should now (hopefully) work correct in all cases
where nested classes and/or namespaces are used.
+ Fixed a scanner problem that could cause doxygen to get
confused after parsing struct initializers.
+ the DOTFONTPATH environment variable is now automatically set
for Windows. This should make any "missing doxfont.ttf"
messages disappear.
+ the extra LaTeX packages specified with EXTRA_PACKAGES can now
also be used when generating formulas for HTML.
+ The documentation of a parameters that is part of a member definition,
is now used in the documentation as well.
+ Fixed a HTML output bug in the class/file group-pages.
+ Links to example files generated with \link ... \endlink where not
correct.
+ made the bullet list generation more robust. A space is now required
after the - sign. A list can now start a paragraph.
+ the configure script now detects whether or not dot is installed.
+ The VERBATIM_HEADERS option didn't have any effect any more.
It should now works again as advertised.
+ The IGNORE_PREFIX option can now also deal with a list of prefixes.
+ @verbatim ... @endverbatim blocks did not work.
+ new option SHOW_INCLUDE_FILES, which can be set to NO to turn of the
list of include files that is generated for each documented file.
+ new option STRIP_CODE_COMMENTS, which can be set to NO to keep any
special comment blocks in the generated code fragments.
Diffstat (limited to 'src/scanner.l')
-rw-r--r-- | src/scanner.l | 114 |
1 files changed, 85 insertions, 29 deletions
diff --git a/src/scanner.l b/src/scanner.l index 4756439..e2a587d 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -77,6 +77,7 @@ static int lastVerbState; static int lastStringContext; static int lastCurlyContext; static int lastRoundContext; +static int lastSquareContext; static int lastCodeState; static int lastAfterDocContext; static int lastGroupContext; @@ -84,6 +85,7 @@ static int lastMemberGroupContext; static int lastFormulaContext; static int lastAnchorContext; static int lastInitializerContext; +static int lastClassTemplSpecContext; static int nextDefContext; static int overloadContext; static Protection protection; @@ -91,6 +93,7 @@ static Protection baseProt; static int sharpCount = 0 ; static int roundCount = 0 ; static int curlyCount = 0 ; +static int squareCount = 0 ; static int ifCount = 0 ; static Entry* current_root = 0 ; static Entry* global_root = 0 ; @@ -936,6 +939,7 @@ VAR [vV][aA][rR] %x Sharp %x SkipSharp %x SkipRound +%x SkipSquare %x TypedefName %x Comment %x Doc @@ -1086,7 +1090,7 @@ VAR [vV][aA][rR] if (inBlock()) endBlock(); } */ -<DocScan>^{B}*(("//"{B}*)?)"*"*[ \t]*"-" { /* found list item marker */ +<DocScan>^{B}*(("//"{B}*)?)"*"*{B}*"-"{B}+ { /* found list item marker */ addListItemMarker(yytext); } <DocScan>"<!--" { BEGIN(DocSkipHtmlComment); } @@ -1155,7 +1159,7 @@ VAR [vV][aA][rR] outDoc->endCodeFragment(); BEGIN(DocScan); } -<DocVerbatim>[^\n\\]*"\n" { +<DocVerbatim>[^\n\\\@]*"\n" { //printf("docifying: %s\n",yytext); outDoc->codify(yytext); } @@ -1167,7 +1171,7 @@ VAR [vV][aA][rR] char c[2];c[0]=*yytext;c[1]='\0'; outDoc->codify(c); } -<DocScan>{CMD}"internal"{BN}+ { +<DocScan>{CMD}"internal"/{BN} { if (!Config::internalDocsFlag) { outDoc->newParagraph(); @@ -1224,7 +1228,7 @@ VAR [vV][aA][rR] outDoc->addToIndex(yytext,0); BEGIN(DocScan); } -<DocScan>{CMD}"arg"{BN}+ { +<DocScan>{CMD}"arg"/{BN} { if (insideArgumentList) { outDoc->writeListItem(); @@ -1239,7 +1243,7 @@ VAR [vV][aA][rR] <DocScan>{CMD}"par"{B}+ { BEGIN(DocPar); } -<DocPar>[^\n]*{BN}+ { +<DocPar>[^\n]*{BN} { endArgumentList(); if (inBlock()) endBlock(); inParBlock=TRUE; @@ -1251,7 +1255,7 @@ VAR [vV][aA][rR] outDoc->writeDescItem(); BEGIN(DocScan); } -<DocScan>{CMD}"warning"{BN}+ { +<DocScan>{CMD}"warning"/{BN} { endArgumentList(); if (!inWarningBlock) { @@ -1270,7 +1274,7 @@ VAR [vV][aA][rR] outDoc->writeDescItem(); } } -<DocScan>{CMD}"bug"[s]?{BN}+ { +<DocScan>{CMD}"bug"[s]?/{BN} { endArgumentList(); if (!inBugBlock) { @@ -1288,7 +1292,7 @@ VAR [vV][aA][rR] outDoc->writeDescItem(); } } -<DocScan>{CMD}"pre"[s]?{BN}+ { +<DocScan>{CMD}"pre"[s]?/{BN} { endArgumentList(); if (!inPreBlock) { @@ -1306,7 +1310,7 @@ VAR [vV][aA][rR] outDoc->writeDescItem(); } } -<DocScan>{CMD}"post"[s]?{BN}+ { +<DocScan>{CMD}"post"[s]?/{BN} { endArgumentList(); if (!inPostBlock) { @@ -1324,7 +1328,7 @@ VAR [vV][aA][rR] outDoc->writeDescItem(); } } -<DocScan>{CMD}"invariant"[s]?{BN}+ { +<DocScan>{CMD}"invariant"[s]?/{BN} { endArgumentList(); if (!inInvarBlock) { @@ -1342,7 +1346,7 @@ VAR [vV][aA][rR] outDoc->writeDescItem(); } } -<DocScan>{CMD}"version"{BN}+ { +<DocScan>{CMD}"version"/{BN} { endArgumentList(); if (!inVersionBlock) { @@ -1360,7 +1364,7 @@ VAR [vV][aA][rR] outDoc->writeDescItem(); } } -<DocScan>{CMD}"date"{BN}+ { +<DocScan>{CMD}"date"/{BN} { endArgumentList(); if (!inDateBlock) { @@ -1378,7 +1382,7 @@ VAR [vV][aA][rR] outDoc->writeDescItem(); } } -<DocScan>{CMD}"deprecated"{BN}+ { +<DocScan>{CMD}"deprecated"/{BN} { endArgumentList(); if (!inDeprecatedBlock) { @@ -1396,7 +1400,7 @@ VAR [vV][aA][rR] outDoc->writeDescItem(); } } -<DocScan>{CMD}"author"{BN}+ { +<DocScan>{CMD}"author"/{BN} { endArgumentList(); if (!inAuthorBlock) { @@ -1414,7 +1418,7 @@ VAR [vV][aA][rR] outDoc->docify(", "); } } -<DocScan>{CMD}("return"([s])?|"result"){BN}+ { +<DocScan>{CMD}("return"([s])?|"result")/{BN} { endArgumentList(); if (!inReturnBlock) { @@ -1428,7 +1432,7 @@ VAR [vV][aA][rR] outDoc->writeDescItem(); } } -<DocScan>{CMD}("sa"|"see"){BN}+ { +<DocScan>{CMD}("sa"|"see")/{BN} { endArgumentList(); if (!inSeeBlock) { @@ -1446,7 +1450,7 @@ VAR [vV][aA][rR] outDoc->docify(", "); } } -<DocScan>{CMD}"param"{BN}+ { +<DocScan>{CMD}"param"/{BN} { endArgumentList(); if (!inParamBlock) { @@ -1466,7 +1470,7 @@ VAR [vV][aA][rR] } BEGIN(DocParam); } -<DocScan>{CMD}"retval"{BN}+ { +<DocScan>{CMD}"retval"/{BN} { endArgumentList(); if (!inRetValBlock) { @@ -1486,7 +1490,7 @@ VAR [vV][aA][rR] } BEGIN(DocParam); } -<DocScan>{CMD}("exception"|"throw")s?{BN}+ { +<DocScan>{CMD}("exception"|"throw")s?/{BN} { endArgumentList(); if (!inExceptionBlock) { @@ -1983,7 +1987,24 @@ VAR [vV][aA][rR] outDoc->docify(yytext); } <DocCode,DocEmphasis,DocBold>"\n" { outDoc->writeChar('\n'); } -<DocScan>({B}*"\n"){2,}{B}* { +<DocScan>({B}*"\n"){2,}{B}*"*"*{B}*"-"{B}+ { // new paragraph & start of a list + if (insideArgumentList) + { + insideArgumentList=FALSE; + outDoc->endItemList(); + } + else if (insideItemList) + { + forceEndItemList(); + } + else + { + outDoc->newParagraph(); + } + if (inBlock()) endBlock(); + addListItemMarker(strrchr(yytext,'\n')+1); + } +<DocScan>({B}*"\n"){2,}{B}* { // new paragraph if (insideArgumentList) { insideArgumentList=FALSE; @@ -2144,6 +2165,9 @@ VAR [vV][aA][rR] <FindMembers>{B}*"inline"{BN}+ { current->inLine = TRUE; lineCount(); } +<FindMembers>{B}*"import"{BN}+ { // IDL import keyword + BEGIN( NextSemi ); + } <FindMembers>{B}*"typename"{BN}+ { lineCount(); } <FindMembers>{B}*"namespace"{BN}+ { isTypedef=FALSE; @@ -2676,19 +2700,38 @@ VAR [vV][aA][rR] } } -<FindMembers>"[" { current->args += yytext ; - sharpCount=1; - BEGIN( Array ) ; +<FindMembers>"[" { + if (current->name.isEmpty()) // IDL function property + { + squareCount=1; + lastSquareContext = YY_START; + BEGIN(SkipSquare); + } + else + { + current->args += yytext ; + squareCount=1; + BEGIN( Array ) ; + } } <Array>"]" { current->args += *yytext ; - if (--sharpCount<=0) + if (--squareCount<=0) BEGIN( FindMembers ) ; } <Array>"[" { current->args += *yytext ; - sharpCount++; + squareCount++; } <Array>. { current->args += *yytext ; } - +<SkipSquare>"[" { squareCount++; } +<SkipSquare>"]" { + if (--squareCount<=0) + BEGIN( lastSquareContext ); + } +<SkipSquare>\" { + lastStringContext=YY_START; + BEGIN( SkipString ); + } +<SkipSquare>[^\n\[\]\"]+ <FindMembers>"<" { addType( current ) ; current->type += yytext ; BEGIN( Sharp ) ; @@ -3343,6 +3386,7 @@ VAR [vV][aA][rR] <SkipInits>"{" { //addToBody(yytext); lastCurlyContext = FindMembers; + curlyCount=0; BEGIN( SkipCurly ) ; } <SkipCurly>"{" { @@ -3467,13 +3511,15 @@ VAR [vV][aA][rR] sharpCount = 0; current->name = yytext ; lineCount(); + lastClassTemplSpecContext = ClassVar; BEGIN( ClassTemplSpec ); } <ClassTemplSpec>">"({BN}*{SCOPENAME})? { current->name += yytext; if (--sharpCount<=0) { - BEGIN( ClassVar ); + current->name = removeRedundantWhiteSpace(current->name); + BEGIN( lastClassTemplSpecContext ); } } <ClassTemplSpec>"<" { @@ -3849,6 +3895,16 @@ VAR [vV][aA][rR] "\\namespace at line %d of %s.\n",yyLineNr,yyFileName); yyLineNr++; } +<ClassDocArg1>{SCOPENAME}/"<" { + current->name = yytext; + // prepend outer scope name + if (current_root->section & Entry::SCOPE_MASK) + { + current->name.prepend(current_root->name+"::"); + } + lastClassTemplSpecContext = ClassDocArg2; + BEGIN( ClassTemplSpec ); + } <ClassDocArg1>{SCOPENAME} { current->name = yytext; // prepend outer scope name @@ -4011,7 +4067,7 @@ VAR [vV][aA][rR] current->doc+=yytext; BEGIN(lastVerbState); } -<SkipVerbatim>[^ \t\/\\\n]* { +<SkipVerbatim>[^ \t\/\@\\\n]* { current->doc+=yytext; } <SkipVerbatim>^"//" { @@ -4360,7 +4416,7 @@ VAR [vV][aA][rR] unput('/');unput('*'); BEGIN( tmpDocType ); } -<Doc,JavaDoc,ClassDoc,PageDoc,ExampleDoc,ReadFormulaShort,ReadFormulaLong,ClassDocBrief>^{B}*(("//"{B}*)?)"*"+[ \t]*"-" { +<Doc,JavaDoc,ClassDoc,PageDoc,ExampleDoc,ReadFormulaShort,ReadFormulaLong,ClassDocBrief>^{B}*(("//"{B}*)?)"*"+[ \t]*"-"{B}+ { current->doc += yytext; } <Doc,JavaDoc,ClassDoc,PageDoc,ExampleDoc,ReadFormulaShort,ReadFormulaLong,ClassDocBrief>^{B}*(("//"{B}*)?)"*"+/[^/] |