diff --git a/src/DynareBison.yy b/src/DynareBison.yy index 063d2a9805bbc8bd5be9fdf2e530c4eb51bac9bd..60b773691f94c87c12f643df20d98c5646a5bffe 100644 --- a/src/DynareBison.yy +++ b/src/DynareBison.yy @@ -2869,9 +2869,9 @@ initial_condition_decomposition_option : o_icd_type | o_icd_write_xls | o_icd_plot_init_date | o_icd_plot_end_date - | o_nodisplay - | o_graph_format - | o_psd_fig_name + | o_icd_nodisplay + | o_icd_graph_format + | o_icd_fig_name | o_icd_diff | o_icd_flip ; @@ -3268,6 +3268,7 @@ o_shock_decomposition_forecast : FORECAST EQUAL INT_NUMBER { driver.option_num(" o_save_realtime : SAVE_REALTIME EQUAL vec_int { driver.option_vec_int("shock_decomp.save_realtime", $3); }; o_fast_realtime : FAST_REALTIME EQUAL INT_NUMBER { driver.option_num("shock_decomp.fast_realtime", $3); }; o_nodisplay : NODISPLAY { driver.option_num("nodisplay", "true"); }; +o_icd_nodisplay : NODISPLAY { driver.option_num("initial_condition_decomp.nodisplay", "true"); }; o_psd_nodisplay : NODISPLAY { driver.option_num("plot_shock_decomp.nodisplay", "true"); }; o_psd_init2shocks : INIT2SHOCKS { driver.option_str("plot_shock_decomp.init2shocks", "default"); } | INIT2SHOCKS EQUAL symbol { driver.option_str("plot_shock_decomp.init2shocks", $3); } @@ -3277,6 +3278,11 @@ o_graph_format : GRAPH_FORMAT EQUAL allowed_graph_formats | GRAPH_FORMAT EQUAL '(' list_allowed_graph_formats ')' { driver.process_graph_format_option(); } ; +o_icd_graph_format : GRAPH_FORMAT EQUAL allowed_graph_formats + { driver.initial_condition_decomp_process_graph_format_option(); } + | GRAPH_FORMAT EQUAL '(' list_allowed_graph_formats ')' + { driver.initial_condition_decomp_process_graph_format_option(); } + ; o_psd_graph_format : GRAPH_FORMAT EQUAL allowed_graph_formats { driver.plot_shock_decomp_process_graph_format_option(); } | GRAPH_FORMAT EQUAL '(' list_allowed_graph_formats ')' @@ -3396,6 +3402,7 @@ o_psd_interactive : INTERACTIVE { driver.option_num("plot_shock_decomp.interacti o_psd_screen_shocks : SCREEN_SHOCKS { driver.option_num("plot_shock_decomp.screen_shocks", "true"); }; o_psd_steadystate : STEADYSTATE { driver.option_num("plot_shock_decomp.steadystate", "true"); }; o_icd_steadystate : STEADYSTATE { driver.option_num("initial_condition_decomp.steadystate", "true"); }; +o_icd_fig_name : FIG_NAME EQUAL filename { driver.option_str("initial_condition_decomp.fig_name", $3); }; o_psd_fig_name : FIG_NAME EQUAL filename { driver.option_str("plot_shock_decomp.fig_name", $3); }; o_psd_type : TYPE EQUAL QOQ { driver.option_str("plot_shock_decomp.type", "qoq"); } diff --git a/src/ParsingDriver.cc b/src/ParsingDriver.cc index 535790be6f4e98d29db5d4c5d77f0a19529e155b..0f72b0c50cbc8f0640ac3de21b218d88b1abc576 100644 --- a/src/ParsingDriver.cc +++ b/src/ParsingDriver.cc @@ -3236,6 +3236,13 @@ ParsingDriver::process_graph_format_option() graph_formats.clear(); } +void +ParsingDriver::initial_condition_decomp_process_graph_format_option() +{ + options_list.symbol_list_options["initial_condition_decomp.graph_format"] = graph_formats; + graph_formats.clear(); +} + void ParsingDriver::plot_shock_decomp_process_graph_format_option() { diff --git a/src/ParsingDriver.hh b/src/ParsingDriver.hh index 4291952b3fcaac300acb28f462744e1787dc5250..81a88a5cb8122ed3835727eda6bf826ac32fbc2a 100644 --- a/src/ParsingDriver.hh +++ b/src/ParsingDriver.hh @@ -852,6 +852,8 @@ public: void add_graph_format(const string &name); //! Add the graph_format option to the OptionsList structure void process_graph_format_option(); + //! Add the graph_format option to the initial_condition_decomp substructure of the OptionsList structure + void initial_condition_decomp_process_graph_format_option(); //! Add the graph_format option to the plot_shock_decomp substructure of the OptionsList structure void plot_shock_decomp_process_graph_format_option(); //! Model diagnostics