diff --git a/preprocessor/macro/MacroDriver.cc b/preprocessor/macro/MacroDriver.cc index 71d53b9cbaf0da6373d662f5ea3d926651906893..01558b72524bb79aae059781bf641a67d8efb101 100644 --- a/preprocessor/macro/MacroDriver.cc +++ b/preprocessor/macro/MacroDriver.cc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2017 Dynare Team + * Copyright (C) 2008-2018 Dynare Team * * This file is part of Dynare. * @@ -64,7 +64,11 @@ MacroDriver::parse(const string &f, ostream &out, bool debug, bool no_line_macro } catch (boost::bad_lexical_cast &) { - file_with_endl << "@#define " << it->first << " = \"" << it->second << "\"" << endl; + if (it->second.front() == '[' && it->second.back() == ']') + // If the input is an array. Issue #1578 + file_with_endl << "@#define " << it->first << " = " << it->second << endl; + else + file_with_endl << "@#define " << it->first << " = \"" << it->second << "\"" << endl; } file_with_endl << in.rdbuf() << endl;