From 910649dd28ea3f78d6cf4cb245a2747207828bf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Tue, 20 Apr 2021 10:39:14 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20treatment=20of=20=E2=80=9Cseries=E2=80=9D?= =?UTF-8?q?=20option=20of=20=E2=80=9Cinitval=5Ffile=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This option was treated as a numeric value: it was a hack to ensure that the name of the dseries object was printed without quotes in the driver file. However, that would make the JSON output synctically incorrect. This commits removes the hack, and treats the “series” option as a string value (in the same way as for the “data” command). A modification of the MATLAB code will thus be needed to accomodate the change. --- src/DynareBison.yy | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/DynareBison.yy b/src/DynareBison.yy index 254ee7fa..1f219c6d 100644 --- a/src/DynareBison.yy +++ b/src/DynareBison.yy @@ -787,7 +787,7 @@ h_options: o_filename | o_last_obs | o_data_last_obs | o_nobs - | o_series2 + | o_series ; endval : ENDVAL ';' initval_list END ';' @@ -3156,7 +3156,6 @@ o_pac_steady_state_growth : STEADY_STATE_GROWTH EQUAL signed_number { driver.set o_var_name : MODEL_NAME EQUAL symbol { driver.option_str("var.model_name", $3); }; o_var_order : ORDER EQUAL INT_NUMBER { driver.option_num("var.order", $3); }; o_series : SERIES EQUAL symbol { driver.option_str("series", $3); }; -o_series2 : SERIES EQUAL symbol { driver.option_num("series", $3); }; o_datafile : DATAFILE EQUAL filename { driver.option_str("datafile", $3); }; o_filename : FILENAME EQUAL filename { driver.option_str("filename", $3); }; o_var_eq_tags : EQTAGS EQUAL vec_str { driver.option_vec_str("var.eqtags", $3); } -- GitLab