Sébastien Villemot
ae59f4dcb2
Further improvements to parsing of arguments on the MATLAB command-line
...
Under GNU/Linux and macOS, double-quote arguments before passing them to the
shell. In particular, this allows passing single-quotes within those arguments.
We therefore have to escape the four characters that are interpreted within
double-quoted strings in POSIX shells: \, ", $ and `
On Windows, also systematically escape the backslashes.
Also move display of arguments before escaping, so that it remains readable.
Ref. #1696
2020-02-10 18:24:51 +01:00
Houtan Bastani
d527096e61
simplify parsing of MATLAB command line arguments
...
closes #1696
includes preprocessor changes
- Removed prefixing of doubles between -1 and 1 with 0.
- Fixed bug introduced in 985d742.
- macro processor: simplify handling of `@#define`
2020-01-29 14:56:52 +01:00
Sébastien Villemot
d3e90a8dbf
Fix the handling of options nopreprocessoroutput, onlyjson and onlymacro when they appear at the top of the .mod file
...
The nopathchange is still not supported in this context, so document it.
Also recommend the whitespace-separated syntax instead of the comma-separated
syntax, since the latter is inconsistent with the way options are passed on the
command-line.
Closes : #1667
2020-01-23 18:58:08 +01:00
Sébastien Villemot
9f51b2508a
Disable spurious warnings as early as possible
...
This is necessary for Octave under Windows, to avoid a warning about isdir()
triggered by user_has_octave_forge_package.m.
2020-01-21 18:39:33 +01:00
Sébastien Villemot
4e314a529b
Bump minimal required Octave version to 4.4
2020-01-06 18:29:47 +01:00
Sébastien Villemot
49dc997073
Global reindentation of MATLAB code (excluding submodules)
...
Also convert to Unix end-of-lines, and remove trailing whitespaces.
2019-12-20 16:30:27 +01:00
Houtan Bastani
dec7d4fdb4
dynare.m: simplify code
2019-12-06 12:01:58 +01:00
Houtan Bastani
3a223e9c08
fix uncommon bug in parsing dynare command line options
...
previously, `nopathchange` and `nopreprocessoroutput` were set even if they were values instead of option names.
`nopathchange` would further remove all options that contained `'nopathchange'`
e.g. `dynare example1.mod savemacro=nopathchange` would erroneously set `nopathchange` to true and would delete the `savemacro` option altogether
In the fix, just check that the match starts in position 1 as, if the argument passed is longer than the matching pattern (e.g. nopathchangee), the preprocessor will stop processing with a usage error
2019-12-06 12:01:57 +01:00
Houtan Bastani
8b86f8a25b
ignore unused output variable
2019-10-09 14:53:33 +02:00
Sébastien Villemot
f44bb38c72
More capitalization fixes and cosmetics
...
[skip ci]
2019-10-03 16:21:15 +02:00
Houtan Bastani
53ce6222c2
remove unused variable in dynare_config
2019-09-05 11:48:19 +02:00
Sébastien Villemot
e872f08cc5
Improve display of preprocessor arguments under Octave
2019-05-20 18:53:51 +02:00
Sébastien Villemot
f363c3da6b
Restore behavior of 'nolog' option
...
The option had been broken by 0e77815ece
.
This option cannot be entirely handled at the preprocessor level, since the
main log file is created at the MATLAB/Octave level. Handle it via a dedicated
regular expression.
2018-12-20 17:10:22 +01:00
Sébastien Villemot
0e77815ece
Options list at the top of the mod-file now parsed by the preprocessor
...
Closes #1630
2018-12-19 16:15:48 +01:00
Sébastien Villemot
18faa9733c
Further updates related to minimal MATLAB version bump
2018-11-13 18:29:20 +01:00
Sébastien Villemot
7a75872f72
Modernization: use tilde (~) syntax for ignored output arguments
2018-11-13 18:02:09 +01:00
Sébastien Villemot
736d43c4e6
Bump minimal MATLAB version requirement to 7.9 (R2009b)
2018-11-13 15:59:16 +01:00
Sébastien Villemot
096936be9c
The preprocessor now compiles the MEX when use_dll is specified
...
Update documentation accordingly (except on macOS where the solution has not
yet been implemented).
Also include MinGW in the Windows installer.
2018-10-29 14:41:34 +01:00
Sébastien Villemot
b2c554623f
Various fixes related to the new layout of generated files
2018-06-28 18:14:40 +02:00
Sébastien Villemot
a1b8bd39b2
Move the location of various generated files on the filesystem
...
- M and MEX files are now under +${MODELNAME}/
- bytecode, C source and JSON now under ${MODELNAME}/model/
2018-06-27 17:03:39 +02:00
Sébastien Villemot
a71e0ebee4
Add a compile-time check for MATLAB version, as we already do for Octave
2018-06-06 14:31:25 +02:00
Sébastien Villemot
88e89dfb21
Refactor test for Octave version
...
Distinguish between a minimal version required (from a source code perspective,
applicable on all platforms) and an exact version requirement (from a binary
package perspective, in practice used only for our Windows package).
2018-06-06 14:27:53 +02:00
Sébastien Villemot
0b2828af8a
Fix typo
2018-06-05 17:27:22 +02:00
Sébastien Villemot
e8ade6a187
Fix display of Dynare command arguments
2018-06-05 17:27:03 +02:00
Sébastien Villemot
c180777818
Move check about Octave version to the same place as check for MATLAB
2018-05-16 17:12:48 +02:00
Sébastien Villemot
42b82087d5
Remove codepaths for unsupported Octave versions
2018-05-16 17:12:48 +02:00
Houtan Bastani
d54cdbf0ac
fix output when no arguments are passed to dynare
2018-02-16 17:31:53 +01:00
Houtan Bastani
5d439bcb18
submodule update: preprocessor and add dynare version to dynare.m
2018-02-16 17:31:47 +01:00
Houtan Bastani
f1db5cd264
dynare command line: fix bug introduced in c258bad2ab
2017-11-14 14:09:15 +01:00
Houtan Bastani
c258bad2ab
dynare command line: be less strict in accepting macros from .mod file
2017-11-14 12:21:48 +01:00
Houtan Bastani
51fd3fd988
preprocessor: perpetuate nopreprocessoroutput option to preprocessor code #1390
2017-09-28 14:58:25 +02:00
Houtan Bastani
d648f76462
dynare.m: aesthetic fix: remove unnecessary parenthesis
2017-09-08 15:09:05 +02:00
Houtan Bastani
43bed00e3f
dynare.m: don’t redo strfind as value exists in dot_location variable
2017-09-08 15:07:40 +02:00
Houtan Bastani
9c86168d63
Revert "simplify check for ‘.’ in name"
...
This reverts commit a302b7af99
.
2017-09-08 15:07:23 +02:00
Houtan Bastani
a302b7af99
simplify check for ‘.’ in name
2017-09-08 14:57:53 +02:00
Houtan Bastani
1c485c894f
Add nopreprocessoroutput option to dynare. Closes #1390
2017-08-25 14:26:39 +02:00
Houtan Bastani
41e6ecaacd
bug: nopathchange was always being set, regardless of whether or not the flag was passed
2017-08-25 14:21:25 +02:00
Houtan Bastani
f32f5f7346
display options that dynare is called with in output
2017-07-03 17:45:06 +02:00
Stéphane Adjemian (Charybdis)
63d6dfccf4
Added the possibility to dynare the dynare command options in the mod file.
2017-06-30 10:16:26 +02:00
Stéphane Adjemian (Charybdis)
b5275edaa1
Simplified test on {dyn, mod} extensions.
2017-06-29 22:13:50 +02:00
Stéphane Adjemian (Charybdis)
ec9f755c27
Raise an error if file name given to dynare ends with a period.
2017-06-29 22:10:06 +02:00
Stéphane Adjemian (Charybdis)
ea9084afc8
Fixed comments.
2017-06-29 22:07:43 +02:00
Stéphane Adjemian (Charybdis)
45aef1de62
Removed test on octave version.
...
Which has moved in dynare_confign, see e71e89bb38
.
2017-06-29 17:55:52 +02:00
Stéphane Adjemian (Charybdis)
fa7adc304b
Display help message if dynare is invoked without arguments.
2017-06-29 16:33:53 +02:00
Stéphane Adjemian (Charybdis)
119b5a62f2
Merge branch 'master' into json
2017-06-16 20:03:36 +02:00
Stéphane Adjemian (Charybdis)
5417b27ac7
Fixed indentation of matlab files.
2017-05-16 15:10:20 +02:00
Stéphane Adjemian (Charybdis)
a53636e24e
Fixed copyright notices.
2017-05-16 14:11:15 +02:00
Stéphane Adjemian (Charybdis)
88e1701289
Removed useless commas and semicolons.
2017-05-16 13:24:46 +02:00
Houtan Bastani
ed3e74994f
preprocessor: add onlyjson option to allow exit upon writing of JSON output. #1387
2017-02-28 14:34:22 +01:00
Houtan Bastani
d05dd34d30
preprocessor: write JSON output. #1387
2017-02-06 17:41:18 +01:00