From 057f260bfdc3a91a71e83dd5843564225a4bf1aa Mon Sep 17 00:00:00 2001 From: Albert <albert.tests@gmail.com> Date: Sun, 10 Nov 2013 19:20:03 +0100 Subject: Bug 711787 - Long initialization line in C stops doxygen An extra "breakpoint" in the input string has been created in the form of a , (comma), so for initialization lines the line will be shorter and the , (comma) will be copied later on. --- src/commentcnv.l | 9 ++++++--- src/scanner.l | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/commentcnv.l b/src/commentcnv.l index 948d6e2..45d94dc 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -241,9 +241,12 @@ void replaceComment(int offset); %% -<Scan>[^"'!\/\n\\#\\-]* { /* eat anything that is not " / or \n */ - copyToOutput(yytext,(int)yyleng); - } +<Scan>[^"'!\/\n\\#\\-\\,]* { /* eat anything that is not " / , or \n */ + copyToOutput(yytext,(int)yyleng); + } +<Scan>[\\,] { /* eat , so we have a nice separator in long initialization lines */ + copyToOutput(yytext,(int)yyleng); + } <Scan>"\"\"\""! { /* start of python long comment */ if (g_lang!=SrcLangExt_Python) { diff --git a/src/scanner.l b/src/scanner.l index f0067b0..0df0a8a 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -3252,7 +3252,10 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) *pCopyCurlyGString+=yytext; } } -<GCopyCurly>[^"'{}\/\n]+ { +<GCopyCurly>[^"'{}\/\n,]+ { + *pCopyCurlyGString+=yytext; + } +<GCopyCurly>[,]+ { *pCopyCurlyGString+=yytext; } <GCopyCurly>"/" { *pCopyCurlyGString+=yytext; } -- cgit v0.12