From 64f6dd32f9c0d0d98bb70dac76af684c608d7dda Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 4 Oct 2020 12:05:52 +0200 Subject: Incorrect recognition as RCS tag When we have a, stripped down, example like: ``` \mainpage the page $PATH:$x86$bin ``` we get the warning like: ``` aa.md:4: warning: end of comment block while expecting command ``` this is due to the fact that `$PATH:$` is seen as a RCS tag although `PATH` is not a RCS keyword. Limiting the number of allowed keywords to the real RCS tags (for CVS the list is the same). See also: - https://www.gnu.org/software/trans-coord/manual/cvs/cvs.html#Keyword-substitution - https://www.gnu.org/software/rcs/manual/rcs.html#Keywords --- src/doctokenizer.l | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/doctokenizer.l b/src/doctokenizer.l index c20ae1a..c91b31e 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -439,6 +439,7 @@ REFWORD4_NOCV (({SCOPEPRE}*"operator"{OPMASKOP2})|(("::"|"#"){SCOPEPRE}*"operat REFWORD4 {REFWORD4_NOCV}{CVSPEC}? REFWORD {FILEMASK}|{LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4} REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} +RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revision"|"Source"|"State")":"[^:\n$][^\n$]*"$" %option noyywrap %option yylineno @@ -681,7 +682,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->name=yytext; return TK_WORD; } -"$"{ID}":"[^:\n$][^\n$]*"$" { /* RCS tag */ +{RCSID} { /* RCS tag */ QCString tagName(yytext+1); int index=tagName.find(':'); g_token->name = tagName.left(index); -- cgit v0.12