From 08caaa07443aabd7b592fc8888dc15eceb8ff791 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Tue, 30 Oct 2018 12:14:26 +0100
Subject: [PATCH] backslashes not used in escape sequences are not allowed in
 strings in Julia v1.0

See: https://github.com/JuliaLang/julia/issues/21284
---
 src/SymbolTable.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/SymbolTable.cc b/src/SymbolTable.cc
index d5e08580..a21b2b22 100644
--- a/src/SymbolTable.cc
+++ b/src/SymbolTable.cc
@@ -1080,7 +1080,7 @@ SymbolTable::writeJuliaOutput(ostream &output) const noexcept(false)
   if (endo_nbr() > 0)
     for (int id = 0; id < endo_nbr(); id++)
       output << "              DynareModel.Endo(\""
-             << getName(endo_ids[id]) << "\", \""
+             << getName(endo_ids[id]) << "\", raw\""
              << getTeXName(endo_ids[id]) << "\", \""
              << getLongName(endo_ids[id]) << "\")" << endl;
   output << "             ]" << endl;
@@ -1091,7 +1091,7 @@ SymbolTable::writeJuliaOutput(ostream &output) const noexcept(false)
   if (exo_nbr() > 0)
     for (int id = 0; id < exo_nbr(); id++)
       output << "             DynareModel.Exo(\""
-             << getName(exo_ids[id]) << "\", \""
+             << getName(exo_ids[id]) << "\", raw\""
              << getTeXName(exo_ids[id]) << "\", \""
              << getLongName(exo_ids[id]) << "\")" << endl;
   output << "            ]" << endl;
@@ -1104,7 +1104,7 @@ SymbolTable::writeJuliaOutput(ostream &output) const noexcept(false)
       if (exo_det_nbr() > 0)
         for (int id = 0; id < exo_det_nbr(); id++)
           output << "                 DynareModel.ExoDet(\""
-                 << getName(exo_det_ids[id]) << "\", \""
+                 << getName(exo_det_ids[id]) << "\", raw\""
                  << getTeXName(exo_det_ids[id]) << "\", \""
                  << getLongName(exo_det_ids[id]) << "\")" << endl;
       output << "                ]" << endl;
@@ -1116,7 +1116,7 @@ SymbolTable::writeJuliaOutput(ostream &output) const noexcept(false)
   if (param_nbr() > 0)
     for (int id = 0; id < param_nbr(); id++)
       output << "               DynareModel.Param(\""
-             << getName(param_ids[id]) << "\", \""
+             << getName(param_ids[id]) << "\", raw\""
              << getTeXName(param_ids[id]) << "\", \""
              << getLongName(param_ids[id]) << "\")" << endl;
   output << "              ]" << endl;
-- 
GitLab