Sébastien Villemot
74ef3457b4
Use secure URL for link to GNU licenses
2021-06-09 17:21:00 +02:00
Sébastien Villemot
ec779235ea
Macro-processor: move environment out of node classes
...
This completes the separation of parse trees from their evaluation.
Closes : #32
2020-12-07 17:29:05 +01:00
Houtan Bastani
abedb47573
macro processor: allow for the definition of a variable without a value
...
- by default, set the value of the variable to `1`, as is done on the command line with the `-D` flag
issue #43
2020-02-19 21:40:40 +01:00
Houtan Bastani
6284e991fc
macro processor: remove unnecessary type specifiers
2020-02-04 11:12:41 +01:00
Houtan Bastani
c6beb6c5c6
macro processor: ignore `@#line` directive
2019-11-22 14:14:05 +01:00
Houtan Bastani
ef4710cdb1
macro processor: fix for loops
2019-10-29 11:21:09 +01:00
Houtan Bastani
031bc62f3a
macro processor: use filesystem after move to C++17, closes #31
...
ancillary to this change is the move of `paths` out of the Driver class into an argument to parsing/evaluation #32
2019-10-03 14:24:47 +02:00
Houtan Bastani
d7e70a4063
macro processor: fix bug: interpret @#include at node level instead of at the Driver level
2019-10-02 17:39:11 +02:00
Houtan Bastani
310f3936fe
macro processor: fix bug: interpret @#includepath at node level instead of at the Driver level
2019-10-02 17:39:05 +02:00
Houtan Bastani
3a21eda40e
macro processor: support @#echomacrovars with symbol_list
...
closes #26
2019-08-26 18:12:04 +02:00
Houtan Bastani
2b3519e3b0
macro processor: add for syntax for shortcut with filtering comprehension
...
closes #28
2019-08-26 16:08:31 +02:00
Houtan Bastani
def99f9dd3
macro processor: simplify parser code
2019-08-26 15:00:53 +02:00
Houtan Bastani
6e523aaf28
macro processor: add immutable Range class, making Array immutable
2019-08-20 15:21:41 +02:00
Houtan Bastani
6c72980580
macro processor: replace uses of make_pair
2019-08-20 14:29:44 +02:00
Houtan Bastani
16080f2bb8
macro processor: make Variable class immutable
2019-08-20 11:16:33 +02:00
Houtan Bastani
b77f6ecd94
macro processor: add `defined` operator
2019-08-19 15:14:51 +02:00
Houtan Bastani
8ebd2a1735
macro processor: support `@#elseif` directive
2019-08-19 15:14:43 +02:00
Sébastien Villemot
30aaf93ca7
Bison 3.2 now generates a default semantic action with variants
...
The minimal required version of Bison is bumped to 3.2, so that we can rely on
those default actions.
2019-08-14 11:22:33 +02:00
Houtan Bastani
bb13b93d59
aesthetic fix
2019-08-13 12:37:34 -04:00
Sébastien Villemot
5960a9168c
Macro processor: fix the shift/reduce conflict related to ternary colon operator
...
The idea is to split the expression rule into smaller subrules, hierarchically
organized according to the operator precedence (Bison still does part of the
job of dealing with precedence).
2019-08-13 18:17:14 +02:00
Houtan Bastani
321f70df21
macro processor: consolidate precedence rules around unary +/- and casting
2019-08-12 16:57:39 -04:00
Houtan Bastani
273c54f7fb
macro processor: introduce functions to test types of variables and literals
2019-08-07 14:16:15 -04:00
Houtan Bastani
d35f2609fe
macro processor: implement `isempty`
2019-08-07 11:59:14 -04:00
Houtan Bastani
309326c372
macro processor: change name of Double type to Real
2019-08-07 10:37:35 -04:00
Houtan Bastani
618bf7c987
macro processor: remove cast to int
2019-08-06 14:10:11 -04:00
Houtan Bastani
b3798a0baa
macro processor: introduce bool casts
2019-08-05 16:30:29 -04:00
Houtan Bastani
eaa8b8fa84
macro processor: introduce array casts
2019-08-02 17:00:23 -04:00
Houtan Bastani
2b1eedd132
macro processor: introduce tuple casts
2019-08-02 16:56:01 -04:00
Houtan Bastani
7e085855b3
macro processor: introduce string casts
2019-08-02 15:19:00 -04:00
Houtan Bastani
5442512904
macro processor: introduce double casts
2019-08-02 15:03:05 -04:00
Houtan Bastani
5fc83fad29
macro processor: introduce integer casts
2019-08-02 14:53:24 -04:00
Houtan Bastani
866e4d6d39
macro processor: introduce colon operator with three args
...
This introduces a shift/reduce compilation warning in the macro processor because at expr COLON expr . COLON expr the parser doesn’t know whether to shift or reduce
2019-07-15 16:29:04 -04:00
Houtan Bastani
1562016389
macro processor: handle case of functions without arguments
2019-06-27 16:47:48 +02:00
Houtan Bastani
63b2117587
macro processor: remove unnecessary includes
2019-06-27 13:57:19 +02:00
Houtan Bastani
bde7c47117
macro processor: combine comprehension classes
2019-06-27 11:44:51 +02:00
Houtan Bastani
d5f728c0a3
macro processor: support array comprehension
2019-06-25 16:50:26 +02:00
Houtan Bastani
2bd6282aef
Revert "macro processor: support array comprehension" (should not have been pushed yet)
...
This reverts commit f2c93d377f
.
2019-06-25 12:14:03 +02:00
Houtan Bastani
f2c93d377f
macro processor: support array comprehension
2019-06-25 11:15:15 +02:00
Houtan Bastani
e5121176a9
fix typo/aesthetic fixes
2019-06-24 16:55:36 +02:00
Houtan Bastani
4c6032895d
macro processor: fix bug in indexing of strings/arrays
2019-06-24 15:57:00 +02:00
Houtan Bastani
6cf9a410d0
macro processor: oblige parens for tuple passed as variable in for loop
2019-06-24 11:58:55 +02:00
Houtan Bastani
a3e63101f4
support `save` option of @#echomacrovars
2019-06-24 11:06:31 +02:00
Houtan Bastani
f400f02432
aesthetic changes
2019-06-24 10:09:37 +02:00
Houtan Bastani
17e040f3f6
macro processor 2.0
2019-06-21 16:45:17 +02:00