diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2007-04-04 19:15:20 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2007-04-04 19:15:20 (GMT) |
commit | 66353e2ea8318031a0dc02de3599861980e25a51 (patch) | |
tree | 7f7bcc4353ffd2147b592358b06865a518c14d7b /src/commentcnv.l | |
parent | cc52853c15833c9a18be11c140b99d94d9e06e9e (diff) | |
download | Doxygen-66353e2ea8318031a0dc02de3599861980e25a51.zip Doxygen-66353e2ea8318031a0dc02de3599861980e25a51.tar.gz Doxygen-66353e2ea8318031a0dc02de3599861980e25a51.tar.bz2 |
Release-1.5.2
Diffstat (limited to 'src/commentcnv.l')
-rw-r--r-- | src/commentcnv.l | 20 |
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); } |