From ee7194bd73ee3a8142aee6ea59d2e5dc717b18de Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 7 May 2014 18:43:50 +0200 Subject: Coded coloring of flow statements corrected (regression) Which patch 8e8c9a1 (dd. May 6) the rule: {FLOW}/[,( \t\n].* has been changed into" {FLOW}/[,( \t\n] (analogous: {COMMANDS}/[,( \t\n]) To overcome the warning: fortrancode.l:744: warning, dangerous trailing context. The result is that the code coloring of (e.g.) the if statements in: subroutine test_on_if if (a == b) then c = d endif if(a == b) then c = d endif end subroutine was removed, due to the fact that the rule: {ID}{BS}/"(" was used instead of the flow coloring rule. This patch fixes the rules so the lines are colored again and there is no warning. --- src/fortrancode.l | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fortrancode.l b/src/fortrancode.l index aaa8510..8b32792 100644 --- a/src/fortrancode.l +++ b/src/fortrancode.l @@ -735,13 +735,13 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I } /*-------- inner construct ---------------------------------------------------*/ -{COMMANDS}/[,( \t\n] { // highlight +{COMMANDS}/{BS}[,( \t\n] { // highlight /* font class is defined e.g. in doxygen.css */ startFontClass("keyword"); codifyLines(yytext); endFontClass(); } -{FLOW}/[,( \t\n] { +{FLOW}/{BS}[,( \t\n] { if (g_isFixedForm) { if ((yy_my_start == 1) && ((yytext[0] == 'c') || (yytext[0] == 'C'))) YY_FTN_REJECT; -- cgit v0.12