From a2c96a9d7927a47ad6017c64df55f32595ccb1e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Tue, 11 May 2021 18:41:59 +0200
Subject: [PATCH] Allow empty quoted strings

Can be useful when resetting a filename option to an empty value, e.g. for the
mh_initialize_from_previous_mcmc_* options.

Ref. dynare!1841
---
 src/DynareFlex.ll | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/DynareFlex.ll b/src/DynareFlex.ll
index 8266d68b..9f7c9724 100644
--- a/src/DynareFlex.ll
+++ b/src/DynareFlex.ll
@@ -963,7 +963,7 @@ DATE -?[0-9]+([ya]|m([1-9]|1[0-2])|q[1-4])
 <DYNARE_BLOCK>\|x { return token::PIPE_X; }
 <DYNARE_BLOCK>\|p { return token::PIPE_P; }
 
-<DYNARE_STATEMENT,DYNARE_BLOCK>\'[^\']+\' {
+<DYNARE_STATEMENT,DYNARE_BLOCK>\'[^\']*\' {
   yylval->build<string>(yytext + 1).pop_back();
   return token::QUOTED_STRING;
 }
-- 
GitLab