From d5a2ee24961b5cdd750cda726402389de9c22c92 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Mon, 17 Feb 2020 14:58:24 +0100
Subject: [PATCH] remove support for weekly dates

(cherry picked from commit 976e2ae17a1c493fe950edcace74f0f092b0e4e5)
---
 src/DynareFlex.ll | 2 +-
 src/Statement.cc  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/DynareFlex.ll b/src/DynareFlex.ll
index 7b0d27c7..7b7c962d 100644
--- a/src/DynareFlex.ll
+++ b/src/DynareFlex.ll
@@ -71,7 +71,7 @@ string eofbuff;
 #define YY_USER_ACTION location_increment(yylloc, yytext);
 %}
 
-DATE -?[0-9]+([ya]|m([1-9]|1[0-2])|q[1-4]|w([1-9]{1}|[1-4][0-9]|5[0-2]))
+DATE -?[0-9]+([ya]|m([1-9]|1[0-2])|q[1-4])
 
 %%
  /* Code put at the beginning of yylex() */
diff --git a/src/Statement.cc b/src/Statement.cc
index ee1b4e11..888af54b 100644
--- a/src/Statement.cc
+++ b/src/Statement.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2006-2019 Dynare Team
+ * Copyright © 2006-2020 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -53,7 +53,7 @@ void
 NativeStatement::writeOutput(ostream &output, const string &basename, bool minimal_workspace) const
 {
   using namespace boost::xpressive;
-  string date_regex = R"((-?\d+([YyAa]|[Mm]([1-9]|1[0-2])|[Qq][1-4]|[Ww]([1-9]{1}|[1-4]\d|5[0-2]))))";
+  string date_regex = R"((-?\d+([YyAa]|[Mm]([1-9]|1[0-2])|[Qq][1-4])))";
   sregex regex_lookbehind = sregex::compile(R"((?<!\$|\d|[a-zA-Z_]|\'))" + date_regex);
   sregex regex_dollar = sregex::compile(R"((\$))"+date_regex);
 
-- 
GitLab