remove support for weekly dates

issue#70
Houtan Bastani 2020-02-17 14:58:24 +01:00
parent fb8a26f877
commit 976e2ae17a
No known key found for this signature in database
GPG Key ID: 000094FB955BE169
2 changed files with 3 additions and 3 deletions

View File

@ -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() */

View File

@ -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);