diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2021-05-24 11:53:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-24 11:53:32 (GMT) |
commit | 629301eb26f22b3befafcf5ce7cabc1feb96108b (patch) | |
tree | f2a5f6b705a97b12f173a2ec3f9a502a5eae9aee | |
parent | 8fa6f9c282ee328df22b0ba007a407e2c2751bab (diff) | |
parent | 4b18ac804b72a099ebeaee051da63f2826082237 (diff) | |
download | Doxygen-629301eb26f22b3befafcf5ce7cabc1feb96108b.zip Doxygen-629301eb26f22b3befafcf5ce7cabc1feb96108b.tar.gz Doxygen-629301eb26f22b3befafcf5ce7cabc1feb96108b.tar.bz2 |
Merge pull request #8553 from albert-github/feature/bug_8552
issue #8552 Javadoc: strange issue with @verbatim ... @endverbatim
-rw-r--r-- | src/commentscan.l | 2 | ||||
-rw-r--r-- | src/lexcode.l | 24 | ||||
-rw-r--r-- | src/lexscanner.l | 26 | ||||
-rw-r--r-- | src/scanner.l | 37 |
4 files changed, 74 insertions, 15 deletions
diff --git a/src/commentscan.l b/src/commentscan.l index 23a0471..2bc1b55 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -1479,7 +1479,7 @@ STopt [^\n@\\]* /* ----- handle arguments of the preformatted block commands ------- */ -<FormatBlock>{CMD}("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"endmsc"|"endvhdlflow")/{NW} { // possible ends +<FormatBlock>{CMD}("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"endmsc")/{NW} { // possible ends addOutput(yyscanner,yytext); if (&yytext[4]==yyextra->blockName) // found end of the block { diff --git a/src/lexcode.l b/src/lexcode.l index 59b05b7..7400bc9 100644 --- a/src/lexcode.l +++ b/src/lexcode.l @@ -727,10 +727,18 @@ NONLopt [^\n]* <DocBlock>{CMD}("f$"|"f["|"f{"|"f(") { yyextra->CCodeBuffer += yytext; yyextra->docBlockName=&yytext[1]; + if (yyextra->docBlockName.at(1)=='[') + { + yyextra->docBlockName.at(1)=']'; + } if (yyextra->docBlockName.at(1)=='{') { yyextra->docBlockName.at(1)='}'; } + if (yyextra->docBlockName.at(1)=='(') + { + yyextra->docBlockName.at(1)=')'; + } yyextra->fencedSize=0; yyextra->nestedComment=FALSE; BEGIN(DocCopyBlock); @@ -742,7 +750,14 @@ NONLopt [^\n]* yyextra->nestedComment=FALSE; BEGIN(DocCopyBlock); } -<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!) +<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] { // verbatim type command (which could contain nested comments!) + yyextra->CCodeBuffer += yytext; + yyextra->docBlockName="uml"; + yyextra->fencedSize=0; + yyextra->nestedComment=FALSE; + BEGIN(DocCopyBlock); + } +<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!) yyextra->CCodeBuffer += yytext; yyextra->docBlockName=&yytext[1]; yyextra->fencedSize=0; @@ -796,9 +811,12 @@ NONLopt [^\n]* } <DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") { yyextra->CCodeBuffer += yytext; - BEGIN(DocBlock); + if (yyextra->docBlockName==&yytext[1]) + { + BEGIN(DocBlock); + } } -<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block +<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block yyextra->CCodeBuffer += yytext; if (&yytext[4]==yyextra->docBlockName) { diff --git a/src/lexscanner.l b/src/lexscanner.l index 2b6b3a0..b02bf8e 100644 --- a/src/lexscanner.l +++ b/src/lexscanner.l @@ -709,10 +709,18 @@ NONLopt [^\n]* <DocBlock>{CMD}("f$"|"f["|"f{"|"f(") { yyextra->cCodeBuffer += yytext; yyextra->docBlockName=&yytext[1]; + if (yyextra->docBlockName.at(1)=='[') + { + yyextra->docBlockName.at(1)=']'; + } if (yyextra->docBlockName.at(1)=='{') { yyextra->docBlockName.at(1)='}'; } + if (yyextra->docBlockName.at(1)=='(') + { + yyextra->docBlockName.at(1)=')'; + } yyextra->fencedSize=0; yyextra->nestedComment=FALSE; BEGIN(DocCopyBlock); @@ -724,7 +732,14 @@ NONLopt [^\n]* yyextra->nestedComment=FALSE; BEGIN(DocCopyBlock); } -<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!) +<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] { // verbatim type command (which could contain nested comments!) + yyextra->cCodeBuffer += yytext; + yyextra->docBlockName="uml"; + yyextra->fencedSize=0; + yyextra->nestedComment=FALSE; + BEGIN(DocCopyBlock); + } +<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!) yyextra->cCodeBuffer += yytext; yyextra->docBlockName=&yytext[1]; yyextra->fencedSize=0; @@ -777,11 +792,14 @@ NONLopt [^\n]* } <DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") { yyextra->cCodeBuffer += yytext; - BEGIN(DocBlock); + if (yyextra->docBlockName==&yytext[1]) + { + BEGIN(DocBlock); + } } -<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block +<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block yyextra->cCodeBuffer += yytext; - if (&yytext[4]==yyextra->docBlockName) + if (yyextra->docBlockName==&yytext[4]) { BEGIN(DocBlock); } diff --git a/src/scanner.l b/src/scanner.l index 4fb625f..6ecd1f8 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -4534,7 +4534,12 @@ NONLopt [^\n]* unput(yyextra->lastCopyArgChar); BEGIN( yyextra->lastCommentInArgContext ); } -<CopyArgCommentLine>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!) +<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] { // verbatim type command (which could contain nested comments!) + yyextra->docBlockName="uml"; + yyextra->fullArgString+=yytext; + BEGIN(CopyArgVerbatim); + } +<CopyArgCommentLine>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!) yyextra->docBlockName=&yytext[1]; yyextra->fullArgString+=yytext; BEGIN(CopyArgVerbatim); @@ -4543,7 +4548,7 @@ NONLopt [^\n]* yyextra->docBlockName=&yytext[1]; if (yyextra->docBlockName.at(1)=='[') { - yyextra->docBlockName.at(1)='}'; + yyextra->docBlockName.at(1)=']'; } if (yyextra->docBlockName.at(1)=='{') { @@ -4556,9 +4561,9 @@ NONLopt [^\n]* yyextra->fullArgString+=yytext; BEGIN(CopyArgVerbatim); } -<CopyArgVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endcode"|"f$"|"f]"|"f}"|"f)")/[^a-z_A-Z0-9\-] { // end of verbatim block +<CopyArgVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"ebdmsc"|"enduml"|"endcode"|"f$"|"f]"|"f}"|"f)")/[^a-z_A-Z0-9\-] { // end of verbatim block yyextra->fullArgString+=yytext; - if (yytext[1]=='f') // end of formula + if (yytext[1]=='f' && yyextra->docBlockName==&yytext[1]) { BEGIN(CopyArgCommentLine); } @@ -6556,10 +6561,18 @@ NONLopt [^\n]* <DocBlock>{CMD}("f$"|"f["|"f{"|"f(") { yyextra->docBlock << yytext; yyextra->docBlockName=&yytext[1]; + if (yyextra->docBlockName.at(1)=='[') + { + yyextra->docBlockName.at(1)=']'; + } if (yyextra->docBlockName.at(1)=='{') { yyextra->docBlockName.at(1)='}'; } + if (yyextra->docBlockName.at(1)=='(') + { + yyextra->docBlockName.at(1)=')'; + } yyextra->fencedSize=0; yyextra->nestedComment=FALSE; BEGIN(DocCopyBlock); @@ -6571,7 +6584,14 @@ NONLopt [^\n]* yyextra->nestedComment=FALSE; BEGIN(DocCopyBlock); } -<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!) +<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!) + yyextra->docBlock << yytext; + yyextra->docBlockName="uml"; + yyextra->fencedSize=0; + yyextra->nestedComment=FALSE; + BEGIN(DocCopyBlock); + } +<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!) yyextra->docBlock << yytext; yyextra->docBlockName=&yytext[1]; yyextra->fencedSize=0; @@ -6637,9 +6657,12 @@ NONLopt [^\n]* } <DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") { yyextra->docBlock << yytext; - BEGIN(DocBlock); + if (yyextra->docBlockName==&yytext[1]) + { + BEGIN(DocBlock); + } } -<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block +<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block yyextra->docBlock << yytext; if (&yytext[4]==yyextra->docBlockName) { |