summaryrefslogtreecommitdiffstats
path: root/src/doctokenizer.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2014-12-19 09:52:50 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2014-12-19 09:52:50 (GMT)
commit60abada8b95cc1772996a264065904f408ed32ff (patch)
treed1c2720b52937bcd8929897f001a9ab310b56a65 /src/doctokenizer.l
parentb3c44e52cf7226b16ebd576ad381c3ee343dfd7e (diff)
downloadDoxygen-60abada8b95cc1772996a264065904f408ed32ff.zip
Doxygen-60abada8b95cc1772996a264065904f408ed32ff.tar.gz
Doxygen-60abada8b95cc1772996a264065904f408ed32ff.tar.bz2
Bug 740218 - Full scope needed when making link inside cross-referenced section (fixed regression)
Diffstat (limited to 'src/doctokenizer.l')
-rw-r--r--src/doctokenizer.l23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index aa8ef8d..8dd06bf 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -49,6 +49,7 @@ static int g_inputPos = 0;
static const char *g_inputString;
static QCString g_fileName;
static bool g_insidePre;
+static int g_sharpCount=0;
// context for section finding phase
static Definition *g_definition;
@@ -437,6 +438,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4}
%x St_Anchor
%x St_Snippet
%x St_SetScope
+%x St_SetScopeEnd
%x St_Sections
%s St_SecLabel1
@@ -1018,8 +1020,29 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4}
g_token->name = g_token->name.stripWhiteSpace();
return TK_WORD;
}
+<St_SetScope>{SCOPEMASK}"<" {
+ g_token->name = yytext;
+ g_token->name = g_token->name.stripWhiteSpace();
+ g_sharpCount=1;
+ BEGIN(St_SetScopeEnd);
+ }
<St_SetScope>{BLANK} {
}
+<St_SetScopeEnd>"<" {
+ g_token->name += yytext;
+ g_sharpCount++;
+ }
+<St_SetScopeEnd>">" {
+ g_token->name += yytext;
+ g_sharpCount--;
+ if (g_sharpCount<=0)
+ {
+ return TK_WORD;
+ }
+ }
+<St_SetScopeEnd>. {
+ g_token->name += yytext;
+ }
<St_Ref2>"&"{ID}";" { /* symbol */
g_token->name = yytext;
return TK_SYMBOL;