From 0e77815ece62be21f99338d45f217a535eccb4c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Wed, 19 Dec 2018 16:15:48 +0100 Subject: [PATCH] Options list at the top of the mod-file now parsed by the preprocessor Closes #1630 --- matlab/dynare.m | 19 ------------------- preprocessor | 2 +- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/matlab/dynare.m b/matlab/dynare.m index 85c9a50a1..15869f75d 100644 --- a/matlab/dynare.m +++ b/matlab/dynare.m @@ -207,25 +207,6 @@ else end end -% Read options from the first line in mod/dyn file. -fid = fopen(fname, 'r'); -firstline = fgetl(fid); -fclose(fid); -if regexp(firstline, '\s*\/\/', 'once') == 1 - firstline = regexprep(firstline, '\s*\/\/', ''); - if ~isempty(regexp(firstline, '(^\s*\-\-\+\s*options:\s*)', 'once')) ... - && ~isempty(regexp(firstline, '(\s*\+\-\-.*$)', 'once')) - firstline = regexprep(firstline, '(^\s*\-\-\+\s*options:\s*)', ''); - firstline = regexprep(firstline, '(\s*\+\-\-.*$)', ''); - dynoption = strsplit(firstline, {' ', ','}); - if isequal(nargin, 1) - varargin = dynoption; - else - varargin = union(varargin, dynoption); - end - end -end - command = ['"' dynareroot 'preprocessor' arch_ext filesep 'dynare_m" ' fname] ; command = [ command ' mexext=' mexext ' "matlabroot=' matlabroot '"']; for i=1:length(varargin) diff --git a/preprocessor b/preprocessor index aad8414f9..1393bf1d7 160000 --- a/preprocessor +++ b/preprocessor @@ -1 +1 @@ -Subproject commit aad8414f94b30a3024bdb759897f100036bf3e95 +Subproject commit 1393bf1d7e1e5db84e8b01a26f9d61196fe6662a