summaryrefslogtreecommitdiffstats
path: root/src/commentcnv.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2007-04-04 19:15:20 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2007-04-04 19:15:20 (GMT)
commitbd691d38fe61aed85189a6675668a67deefd8002 (patch)
tree7f7bcc4353ffd2147b592358b06865a518c14d7b /src/commentcnv.l
parent97a3911e2682bfebeebbb8999c9e3844c414c3e0 (diff)
downloadDoxygen-bd691d38fe61aed85189a6675668a67deefd8002.zip
Doxygen-bd691d38fe61aed85189a6675668a67deefd8002.tar.gz
Doxygen-bd691d38fe61aed85189a6675668a67deefd8002.tar.bz2
Release-1.5.2
Diffstat (limited to 'src/commentcnv.l')
-rw-r--r--src/commentcnv.l20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 238e56b..9462110 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -263,12 +263,11 @@ void replaceComment(int offset);
%}
-CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
-
%option noyywrap
%x Scan
%x SkipString
+%x SkipChar
%x SComment
%x CComment
%x Verbatim
@@ -285,8 +284,9 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
copyToOutput(yytext,yyleng);
BEGIN(SkipString);
}
-<Scan>{CHARLIT} {
+<Scan>' {
copyToOutput(yytext,yyleng);
+ BEGIN(SkipChar);
}
<Scan>\n { /* new line */
copyToOutput(yytext,yyleng);
@@ -398,6 +398,20 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
<SkipString>\n { /* new line inside string (illegal for some compilers) */
copyToOutput(yytext,yyleng);
}
+<SkipChar>\\. { /* escaped character */
+ copyToOutput(yytext,yyleng);
+ }
+<SkipChar>' { /* end of character literal */
+ copyToOutput(yytext,yyleng);
+ BEGIN(Scan);
+ }
+<SkipChar>. { /* any other string character */
+ copyToOutput(yytext,yyleng);
+ }
+<SkipChar>\n { /* new line character */
+ copyToOutput(yytext,yyleng);
+ }
+
<CComment>[^\\@*\n]* { /* anything that is not a '*' or command */
copyToOutput(yytext,yyleng);
}