diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-09-15 19:55:15 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-09-15 19:55:15 (GMT) |
commit | 8d986f5d3a2a40e40d2c9f584f921ed4cc4dd105 (patch) | |
tree | 80bc5b8e1fe89bbf6bd2fbbf2c640eb73313f626 /src/pre.l | |
parent | 0503d26ad7375502459a05a3bb6ff67f1223a77f (diff) | |
download | Doxygen-8d986f5d3a2a40e40d2c9f584f921ed4cc4dd105.zip Doxygen-8d986f5d3a2a40e40d2c9f584f921ed4cc4dd105.tar.gz Doxygen-8d986f5d3a2a40e40d2c9f584f921ed4cc4dd105.tar.bz2 |
Release-1.2.17-20020915
Diffstat (limited to 'src/pre.l')
-rw-r--r-- | src/pre.l | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -98,6 +98,7 @@ static bool g_nospaces; // add extra spaces during macro expansion static bool g_macroExpansion; // from the configuration static bool g_expandOnlyPredef; // from the configuration +static int g_commentCount; static void setFileName(const char *name) @@ -1613,6 +1614,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) g_defText+=' '; g_defLitText+=' '; g_lastCContext=YY_START; + g_commentCount=1; BEGIN(SkipCComment); } <DefineText>"//" { @@ -1622,16 +1624,20 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) BEGIN(SkipCPPComment); } <SkipCComment>"*/" { - outputChar('*');outputChar('/'); - BEGIN(g_lastCContext); + if (--g_commentCount<=0) + { + outputChar('*');outputChar('/'); + BEGIN(g_lastCContext); + } } <SkipCComment>"//" { outputChar('/');outputChar('/'); } <SkipCComment>"/*" { outputChar('/');outputChar('*'); + g_commentCount++; } -<SkipCComment>[^*\n]+ { +<SkipCComment>[^*\n\/]+ { outputArray(yytext,yyleng); } <SkipCComment>\n { @@ -1809,6 +1815,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <*>"/*" { outputChar('/');outputChar('*'); g_lastCContext=YY_START; + g_commentCount=1; BEGIN(SkipCComment); } <*>"//" { |