Commit Graph

51 Commits (c079ace8c3185fded3fa260e464f15912be1dbd2)

Author SHA1 Message Date
Sébastien Villemot 8ad27aba0c Bison/Flex files: do not load C++ mode under Emacs
It is better to use bison-mode and flex-mode (see the wiki)
2012-06-04 11:59:35 +02:00
Houtan Bastani c19950d358 update copyright dates for files already modified in 2012 2012-01-04 14:42:06 +01:00
Houtan Bastani 143c5f569b macroprocessor: add @#ifdef 2012-01-02 18:27:04 +01:00
Sébastien Villemot ff6ae323a6 Build system: add boost includes for macroprocessor 2011-06-13 10:23:55 +02:00
Houtan Bastani 6844e2bef7 Allow commandline defines with string values 2011-06-10 13:25:16 +02:00
Houtan Bastani c42c675075 implement the possibility of passing macro-processor defines on the command-line (ticket 171) 2011-03-29 18:18:46 +02:00
Sébastien Villemot 02652f6eb8 Updated copyright notices 2011-02-04 17:27:33 +01:00
Sébastien Villemot f4557cb195 Reindentation of the preprocessor 2011-02-04 16:25:38 +01:00
Sébastien Villemot 33dee34214 MOD files ending with @#endif/@#endfor but no newline now work (closes #73) 2010-12-06 17:59:30 +01:00
Sébastien Villemot 891ad22564 Macro-processor: integer ranges with lower bound greater than upper bound are now empty (for consistency with MATLAB) 2010-05-12 11:50:27 +02:00
sebastien e6f1a53e60 Beautified preprocessor code (uncrustify + emacs + manual adjustments, in particular with templates in MacroValue)
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3249 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-12-16 17:13:23 +00:00
sebastien edea5b303b Build system: fixes for creation of the tarball
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2968 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-09-24 10:15:59 +00:00
sebastien 254253e097 Build system: fix for FlexLexer.h
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2954 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-09-21 10:00:47 +00:00
sebastien d7f8ec9108 Build system: incorporate FlexLexer.h, so that one can compile on systems without flex
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2942 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-09-17 16:02:55 +00:00
sebastien 9c3c314746 * Rewrite preprocessor build system with automake
* Use new autoconf macros for flex/bison
* Remove autoconf macro for dynare++


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2911 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-09-09 16:47:43 +00:00
sebastien b502d94145 trunk preprocessor: simplified build system (only one Makefile now)
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2455 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-03-12 11:02:56 +00:00
sebastien 35d2231010 trunk preprocessor: fix compatibility issues with Bison 2.4
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2442 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-02-27 14:29:08 +00:00
sebastien 449baffb0a trunk preprocessor/macro: allow empty arrays, and iteration over them in @#for loops (empty array can only be constructed through set difference for the moment)
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2401 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-02-06 15:47:26 +00:00
sebastien d4e10fdaa5 trunk preprocessor: fixed bug in the macro-processor, when the body of a @#for loop is empty
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2399 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-02-05 15:54:09 +00:00
sebastien 7cb97d5ac0 trunk preprocessor: allow one line comments behind @#else
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2396 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-02-04 23:42:48 +00:00
sebastien 783b1adfb6 trunk preprocessor: allow one line comments behind @#endif and @#endfor
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2394 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-02-04 23:24:16 +00:00
sebastien 723b260f9f trunk preprocessor: automatic reindentation of all code with emacs
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2372 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-01-23 10:59:37 +00:00
sebastien 2495aca72a trunk:
* updated copyright headers of all files modified since January 1st: the copyright notice now encompasses 2009
* fixed various other copyright header issues


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2364 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-01-21 14:39:24 +00:00
sebastien c6761f79dd trunk preprocessor: added option to remove @#line statements in output of macro-processor
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2361 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-01-21 13:45:44 +00:00
sebastien 299e68470d trunk preprocessor/macro: report the location of @#for or @#if statement when not matched by an @#endfor or an @#endif
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2304 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-12-09 16:13:03 +00:00
sebastien 34bfaeb3ab trunk preprocessor/macro: added new 'in' operator for testing membership of an array
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2300 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-12-08 15:13:08 +00:00
sebastien 6c0480d7f2 trunk: fixed bug in operator precedence in macro-processor (+ and - had highest precedence than * and /, colon (:) precedence was too high)
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2298 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-12-08 14:42:43 +00:00
sebastien 8bbc105fba trunk preprocessor: for better compliance with C standard:
* replaced all occurrences of "exit(-1)" by "exit(EXIT_FAILURE)"
* return EXIT_SUCCESS at the end of main()


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2229 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-10-29 15:33:16 +00:00
sebastien 2a7ee3d056 v4 preprocessor:
* DynareBison.yy: added missing declaration of MODEL_INFO as a token
* various cosmetic changes


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1995 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-08-25 16:45:39 +00:00
ferhat 3bcff08e87 - Bugs corrections in deterministic simulation with sparse option
- Check allowed with sparse option
- New command "MODEL_INFO" providing informations about the block structure of the model
- Memory leak corrections

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1993 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-08-25 15:06:36 +00:00
sebastien 5ef425857a v4 preprocessor mex: various minor fixed to ensure correct compilation under g++ 4.3
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1906 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-06-28 11:20:45 +00:00
sebastien 9f8deb4fdd v4 preprocessor/macro: added a difference operator on macro arrays
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1799 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-04-14 09:19:01 +00:00
sebastien 39f4ef9d90 v4 preprocessor/macro: changed escape character one more time.
New syntax:
* directives: @#include "filename.mod"
* expressions to be substituted: @{expr}


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1788 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-04-10 08:16:54 +00:00
sebastien 21d00c14bb v4 preprocessor/macro: changed the macro processor escape character from @ to $
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1780 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-04-04 14:57:01 +00:00
sebastien 34d0ecfdb4 v4 preprocessor/macro: bugfix related to nested @for and @if structures
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1770 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-04-02 07:40:09 +00:00
sebastien b2238b80e7 v4 preprocessor/macro: minor fix
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1753 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-03-28 17:45:40 +00:00
sebastien 8e4374ad10 v4 preprocessor: another minor tweak
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1752 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-03-28 17:38:10 +00:00
sebastien b155cb56ba v4 preprocessor: minor improvement related to debugging of scanning & parsing
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1751 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-03-28 17:21:45 +00:00
sebastien 5a4d0eb4ec v4 preprocessor/macro: a double at-sign (@@) can be used to output a single at-sign (@); useful for Matlab function handles
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1747 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-03-28 11:10:28 +00:00
sebastien c239ae9ef3 v4 preprocessor/macro:
* added @if/@then/@else
* added @echo and @error


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1738 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-03-07 15:58:35 +00:00
sebastien 98f9619003 v4 preprocessor/macro: added @for loops
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1724 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-02-29 16:21:01 +00:00
sebastien c43a8d6bdf v4 preprocessor/macro: cosmetic changes in the stack used for nested includes
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1720 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-02-22 14:03:46 +00:00
sebastien 2af63803e8 v4 preprocessor/macro: added various checks and error messages
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1719 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-02-22 12:03:38 +00:00
sebastien 27f7c4834e v4 preprocessor/macro:
* added integer ranges
* added Doxygen documents for MacroValue and its subclass
* fixed string delimiter in macro language (it's double quote and not single)
* fixed problem with line count in presence of macro directives


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1714 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-02-20 09:56:47 +00:00
sebastien 666f93aa77 v4 preprocessor/macro: added handling of arrays
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1711 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-02-19 14:24:40 +00:00
sebastien 0dd30038cb v4 preprocessor/macro: added preliminary handling of expressions and @define
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1707 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-02-15 17:31:40 +00:00
sebastien 083cae4c84 v4 preprocessor: also open included files in binary mode
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1701 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-02-08 17:55:37 +00:00
michel c30f1ab5bc preprocessor: opening file in binary mode solves mysterious bug with CR LF terminated lines under Cygwin
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1700 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-02-08 17:42:09 +00:00
sebastien 0eca1351d9 v4 preprocessor: ignore Ctrl-M in macro-processor
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1699 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-02-08 13:10:10 +00:00
michel b6632e894f adapted Makefile for cross compiling
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1696 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-02-07 21:20:49 +00:00