diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2017-01-17 20:36:36 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2017-01-17 20:36:36 (GMT) |
commit | 04001c8926fb0f37dfcf284b3637b182125bba75 (patch) | |
tree | abcff5b0af881fdaf9534ba81cc4ab22c457f94f | |
parent | 1be97720b7820361e85242d08d4cac3e46570bfe (diff) | |
download | Doxygen-04001c8926fb0f37dfcf284b3637b182125bba75.zip Doxygen-04001c8926fb0f37dfcf284b3637b182125bba75.tar.gz Doxygen-04001c8926fb0f37dfcf284b3637b182125bba75.tar.bz2 |
Bug 776988 - Too greedy behavior of @ref const matching
-rw-r--r-- | src/doctokenizer.l | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/doctokenizer.l b/src/doctokenizer.l index a89570e..7545cba 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -395,10 +395,14 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*{WS}*(("/")?)">" HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"sup"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p" HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P" HTMLKEYW {HTMLKEYL}|{HTMLKEYU} -REFWORD2 ("#"|"::")?((({ID}{TEMPLPART}?)|{ANONNS})("."|"#"|"::"|"-"|"/"))*({ID}{TEMPLPART}?(":")?){FUNCARG2}? -REFWORD3 ({ID}":")*{ID}":"? -REFWORD4 (({SCOPEPRE}*"operator"{OPMASKOP2})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOP2})){CVSPEC}? -REFWORD {LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4} +REFWORD2_PRE ("#"|"::")?((({ID}{TEMPLPART}?)|{ANONNS})("."|"#"|"::"|"-"|"/"))*({ID}{TEMPLPART}?(":")?) +REFWORD2 {REFWORD2_PRE}{FUNCARG2}? +REFWORD2_NOCV {REFWORD2_PRE}("("{FUNCPART}")")? +REFWORD3 ({ID}":")*{ID}":"? +REFWORD4_NOCV (({SCOPEPRE}*"operator"{OPMASKOP2})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOP2})) +REFWORD4 {REFWORD4_NOCV}{CVSPEC}? +REFWORD {LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4} +REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} %option noyywrap %option yylineno @@ -1011,6 +1015,14 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4} unput(*yytext); return 0; } +<St_Ref>{REFWORD_NOCV}/{BLANK}("const")[a-z_A-Z0-9] { // see bug776988 + g_token->name=yytext; + return TK_WORD; + } +<St_Ref>{REFWORD_NOCV}/{BLANK}("volatile")[a-z_A-Z0-9] { // see bug776988 + g_token->name=yytext; + return TK_WORD; + } <St_Ref>{REFWORD} { // label to refer to g_token->name=yytext; return TK_WORD; |