summaryrefslogtreecommitdiffstats
path: root/src/defargs.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-10-12 21:02:43 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-10-12 21:02:43 (GMT)
commit22ce4672811cc5e2718e7b2f2260e68d1e2737a5 (patch)
treef2bd15f538902510455248adb339650be2a7baba /src/defargs.l
parentcfc02d4c998aa5ff2c5130d104e8643810e2f19e (diff)
downloadDoxygen-22ce4672811cc5e2718e7b2f2260e68d1e2737a5.zip
Doxygen-22ce4672811cc5e2718e7b2f2260e68d1e2737a5.tar.gz
Doxygen-22ce4672811cc5e2718e7b2f2260e68d1e2737a5.tar.bz2
Bug 709526 - C++ parsing problem with operators <<, <, >, >> inside templates
Diffstat (limited to 'src/defargs.l')
-rw-r--r--src/defargs.l29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/defargs.l b/src/defargs.l
index fa945f6..6d6136a 100644
--- a/src/defargs.l
+++ b/src/defargs.l
@@ -212,6 +212,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
else // yytext=='<'
{
g_argSharpCount=0;
+ g_argRoundCount=0;
BEGIN( CopyArgSharp );
}
}
@@ -239,6 +240,26 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
if (g_argRoundCount>0) g_argRoundCount--;
else BEGIN( g_readArgContext );
}
+<CopyArgSharp>"<<" {
+ if (g_argRoundCount>0)
+ {
+ *g_copyArgValue += yytext;
+ }
+ else
+ {
+ REJECT;
+ }
+ }
+<CopyArgSharp>">>" {
+ if (g_argRoundCount>0)
+ {
+ *g_copyArgValue += yytext;
+ }
+ else
+ {
+ REJECT;
+ }
+ }
<CopyArgSharp>"<" {
g_argSharpCount++;
*g_copyArgValue += *yytext;
@@ -248,6 +269,14 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
if (g_argSharpCount>0) g_argSharpCount--;
else BEGIN( g_readArgContext );
}
+<CopyArgSharp>"(" {
+ g_argRoundCount++;
+ *g_copyArgValue += *yytext;
+ }
+<CopyArgSharp>")" {
+ g_argRoundCount--;
+ *g_copyArgValue += *yytext;
+ }
<CopyArgCurly>"{" {
g_argCurlyCount++;
*g_copyArgValue += *yytext;