summaryrefslogtreecommitdiffstats
path: root/src/commentcnv.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/commentcnv.l')
-rw-r--r--src/commentcnv.l18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/commentcnv.l b/src/commentcnv.l
index a38228f..e508221 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -67,6 +67,7 @@ static bool g_specialComment;
static QCString g_aliasString;
static int g_blockCount;
+static bool g_lastEscaped;
static int g_lastBlockContext;
static bool g_pythonDocString;
@@ -696,30 +697,41 @@ void replaceComment(int offset);
g_lastBlockContext=YY_START;
g_blockCount=1;
g_aliasString=yytext;
+ g_lastEscaped=0;
BEGIN( ReadAliasArgs );
}
-<ReadAliasArgs>[^{}\n\*]+ {
+<ReadAliasArgs>[^{}\n\\\*]+ {
g_aliasString+=yytext;
+ g_lastEscaped=FALSE;
}
+<ReadAliasArgs>"\\" {
+ if (g_lastEscaped) g_lastEscaped=FALSE;
+ else g_lastEscaped=TRUE;
+ g_aliasString+=yytext;
+ }
<ReadAliasArgs>\n {
g_aliasString+=yytext;
g_lineNr++;
+ g_lastEscaped=FALSE;
}
<ReadAliasArgs>"{" {
g_aliasString+=yytext;
- g_blockCount++;
+ if (!g_lastEscaped) g_blockCount++;
+ g_lastEscaped=FALSE;
}
<ReadAliasArgs>"}" {
g_aliasString+=yytext;
- g_blockCount--;
+ if (!g_lastEscaped) g_blockCount--;
if (g_blockCount==0)
{
replaceAliases(g_aliasString);
BEGIN( g_lastBlockContext );
}
+ g_lastEscaped=FALSE;
}
<ReadAliasArgs>. {
g_aliasString+=yytext;
+ g_lastEscaped=FALSE;
}
<ReadLine>. {
copyToOutput(yytext,yyleng);