From a9681e4a60d831c5facf5872eca57e278e7ed87c Mon Sep 17 00:00:00 2001
From: sebastien <sebastien@ac1d8469-bf42-47a9-8791-bf33cf982152>
Date: Wed, 4 Feb 2009 23:43:35 +0000
Subject: [PATCH] 4.0 preprocessor: merged r2396 changeset from trunk (allow
 one line comments behind @#else)

git-svn-id: https://www.dynare.org/svn/dynare/branches/4.0@2397 ac1d8469-bf42-47a9-8791-bf33cf982152
---
 preprocessor/macro/MacroFlex.ll | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/preprocessor/macro/MacroFlex.ll b/preprocessor/macro/MacroFlex.ll
index b400eaec73..85fd999b38 100644
--- a/preprocessor/macro/MacroFlex.ll
+++ b/preprocessor/macro/MacroFlex.ll
@@ -220,7 +220,7 @@ CONT \\\\
                             }
 <THEN_BODY>.                { then_body_tmp.append(yytext); yylloc->step(); }
 <THEN_BODY><<EOF>>          { driver.error(if_stmt_loc_tmp, "@#if not matched by an @#endif (unexpected end of file)"); }
-<THEN_BODY>^{SPC}*@#{SPC}*else{SPC}*{EOL} {
+<THEN_BODY>^{SPC}*@#{SPC}*else{SPC}*(\/\/.*)?{EOL} {
                               yylloc->lines(1);
                               yylloc->step();
                               if (nested_if_nb)
-- 
GitLab