diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-07-28 08:21:01 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-07-28 08:21:01 (GMT) |
commit | 2340c1e7230b2d83ec34cb6a6a21c47b180d8a51 (patch) | |
tree | ef143366adfcc930fe025bda2eabb4e3162bca8c /src | |
parent | 4fbe0ad60921724faf6ba635df13983b3496f3e9 (diff) | |
download | Doxygen-2340c1e7230b2d83ec34cb6a6a21c47b180d8a51.zip Doxygen-2340c1e7230b2d83ec34cb6a6a21c47b180d8a51.tar.gz Doxygen-2340c1e7230b2d83ec34cb6a6a21c47b180d8a51.tar.bz2 |
More \ilinebr related cleanup and combined some rules
Diffstat (limited to 'src')
-rw-r--r-- | src/commentscan.l | 1 | ||||
-rw-r--r-- | src/doctokenizer.l | 48 |
2 files changed, 19 insertions, 30 deletions
diff --git a/src/commentscan.l b/src/commentscan.l index 763a2dd..5c49323 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -119,7 +119,6 @@ static bool handleHideReferencedByRelation(yyscan_t yyscanner,const QCString &, static bool handleReferencesRelation(yyscan_t yyscanner,const QCString &, const QCStringList &); static bool handleHideReferencesRelation(yyscan_t yyscanner,const QCString &, const QCStringList &); static bool handleInternal(yyscan_t yyscanner,const QCString &, const QCStringList &); -static bool handleLineBr(yyscan_t yyscanner,const QCString &, const QCStringList &); static bool handleStatic(yyscan_t yyscanner,const QCString &, const QCStringList &); static bool handlePure(yyscan_t yyscanner,const QCString &, const QCStringList &); static bool handlePrivate(yyscan_t yyscanner,const QCString &, const QCStringList &); diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 0b14613..b1ccd23 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -810,9 +810,10 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->name = g_token->name.mid(i+1,g_token->name.length()-i-2); BEGIN(St_Code); } +<St_CodeOpt>"\\ilinebr" | <St_CodeOpt>\n | <St_CodeOpt>. { - unput(*yytext); + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); BEGIN(St_Code); } <St_Code>{WS}*{CMD}"endcode" { @@ -834,6 +835,10 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} unput(*yytext); BEGIN(St_HtmlOnly); } +<St_HtmlOnlyOption>"\\ilinebr" { + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); + BEGIN(St_HtmlOnly); + } <St_HtmlOnly>{CMD}"endhtmlonly" { return RetVal_OK; } @@ -925,10 +930,15 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->sectionId = QCString(yytext).stripWhiteSpace(); return RetVal_OK; } +<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANK}*/"\\linebr" { // case 5: plain file name specified without title or attributes + g_token->sectionId = QCString(yytext).stripWhiteSpace(); + return RetVal_OK; + } +<St_PlantUMLOpt>"\\ilinebr" | <St_PlantUMLOpt>"\n" | <St_PlantUMLOpt>. { g_token->sectionId = ""; - unput(*yytext); + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return RetVal_OK; } <St_PlantUML>{CMD}"enduml" { @@ -990,11 +1000,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->chars=yytext; return TK_WHITESPACE; } -<St_TitleN>\n { /* new line => end of title */ - unput(*yytext); - return 0; - } -<St_TitleN>"\\ilinebr" { +<St_TitleN>(\n|"\\ilinebr") { /* new line => end of title */ for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } @@ -1021,11 +1027,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} BEGIN(St_TitleA); return 0; } -<St_TitleQ>\n { /* new line => end of title */ - unput(*yytext); - return 0; - } -<St_TitleQ>"\\ilinebr" { +<St_TitleQ>(\n|"\\ilinebr") { /* new line => end of title */ for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } @@ -1043,11 +1045,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} unput(*yytext); return 0; } -<St_TitleV,St_TitleA>\n { - unput(*yytext); - return 0; - } -<St_TitleV,St_TitleA>"\\ilinebr" { +<St_TitleV,St_TitleA>(\n|"\\ilinebr") { for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } @@ -1076,14 +1074,10 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} unput(' '); return 0; } -<St_Cite>\n { // new line - unput(*yytext); - return 0; - } -<St_Cite>"\\ilinebr" { +<St_Cite>(\n|"\\ilinebr") { // new line for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; - } + } <St_Cite>. { // any other character unput(*yytext); return 0; @@ -1107,14 +1101,10 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} <St_Ref>{WS}+"\""{WS}* { // white space following by quoted string BEGIN(St_Ref2); } -<St_Ref>\n { // new line - unput(*yytext); - return 0; - } -<St_Ref>"\\ilinebr" { +<St_Ref>(\n|"\\ilinebr") { // new line for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; - } + } <St_Ref>. { // any other character unput(*yytext); return 0; |