diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2005-09-18 19:25:32 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2005-09-18 19:25:32 (GMT) |
commit | db36de70fc9090e26c22ab288492407becb3a95e (patch) | |
tree | b25e22f178d0e6d1ebb7e74f2348e9811a2f5394 /src/pre.l | |
parent | 3b98221d43ba62088538ead3aa726f81dd9202f9 (diff) | |
download | Doxygen-db36de70fc9090e26c22ab288492407becb3a95e.zip Doxygen-db36de70fc9090e26c22ab288492407becb3a95e.tar.gz Doxygen-db36de70fc9090e26c22ab288492407becb3a95e.tar.bz2 |
Release-1.4.4-20050918
Diffstat (limited to 'src/pre.l')
-rw-r--r-- | src/pre.l | 100 |
1 files changed, 72 insertions, 28 deletions
@@ -891,35 +891,65 @@ QCString removeMarkers(const char *s) { while ((c=*p)) { - if (c=='@') // replace @@ with @ + switch(c) { - if (*(p+1)=='@') - { - result+=c; - } - p+=2; - } - else if (c=='/') // skip C comments - { - result+=c; - char pc=c; - c=*++p; - if (c=='*') // start of C comment - { - while (*p && !(pc=='*' && c=='/')) // search end of comment + case '@': // replace @@ with @ + { + if (*(p+1)=='@') + { + result+=c; + } + p+=2; + } + break; + case '/': // skip C comments { result+=c; - pc=c; + char pc=c; c=*++p; + if (c=='*') // start of C comment + { + while (*p && !(pc=='*' && c=='/')) // search end of comment + { + result+=c; + pc=c; + c=*++p; + } + result+=c; + p++; + } } - result+=c; - p++; - } - } - else - { - result+=c; - p++; + break; + case '"': // skip string literals + { + result+=c; + char pc=c; + c=*++p; + while (*p && (c!='"' || pc=='\\')) // no end quote + { + result+=c; + c=*++p; + } + } + break; + case '\'': // skip char literals + { + result+=c; + char pc=c; + c=*++p; + while (*p && (c!='\'' || pc=='\\')) // no end quote + { + result+=c; + c=*++p; + } + } + break; + default: + { + result+=c; + p++; + } + break; } } } @@ -1807,12 +1837,19 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) outputChar('/');outputChar('*'); //g_commentCount++; } -<SkipCComment>[\\@][\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ { +<SkipCComment>[\\@][\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"|"f{"|"f$"|"f["){BN}+ { outputArray(yytext,yyleng); } <SkipCComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ { outputArray(yytext,yyleng); - g_blockName=QCString(&yytext[1]).stripWhiteSpace(); + if (yytext[1]=='f') + { + g_blockName="f"; + } + else + { + g_blockName=QCString(&yytext[1]).stripWhiteSpace(); + } BEGIN(SkipVerbatim); } <SkipCComment,SkipCPPComment>[\\@]"cond"[ \t]+ { // conditional section @@ -1835,13 +1872,20 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) outputArray(yytext,yyleng); endCondSection(); } -<SkipVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode") { /* end of verbatim block */ +<SkipVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"f$"|"f]"|"f}") { /* end of verbatim block */ outputArray(yytext,yyleng); - if (&yytext[4]==g_blockName) + if (yytext[1]=='f' && g_blockName=="f") + { + BEGIN(SkipCComment); + } + else if (&yytext[4]==g_blockName) { BEGIN(SkipCComment); } } +<SkipVerbatim>"*/"|"/*" { + outputArray(yytext,yyleng); + } <SkipCComment,SkipVerbatim>[^*\\@\x06\n\/]+ { outputArray(yytext,yyleng); } |