Emile Rolley
4991350b58
feat(backend/ocaml): disambiguate OCaml record names derived from Catala struct
2022-07-12 16:12:18 +02:00
Louis Gesbert
2e5050481d
Register all existing tests through the new engine
...
I removed the '.out' extension for now to preserve the test output file names and avoid a million file renames.
This makes the patch easier to read, and we can do the rename easily in another patch afterwards, without mixing with semantic changes.
(beautiful script àlarrache:
```bash
for f in */*/output/*; do
target_base=${f##*/}
target_base=${target_base%%.*}
echo $f | awk -F. '{
f=$1"."$2; if ($4 == "") { mode=$3; id=$3 } else { scope="-s "$3; mode=$4; id=$3"."$4}
printf "\n```catala-test {id=\"%s\"}\ncatala %s %s\n```\n",id,mode,scope;
}' >> $(dirname $f)/../${target_base}.*; done
```
2022-07-08 17:06:20 +02:00
Louis Gesbert
9ef8625df7
Compiler: support cumulative exceptions
...
Closes #208 (implementing Solution 1, without adding an explicit syntax)
Two exceptions or more, e.g. `(j1 |- c1)` and `(j2 |- c2)` such that `c1
= c2`, are collapsed by this transformation into `((j1 |- c1) | j2 |-
c2)`, introducing an arbitrary precedence that avoids the conflict.
The transormation is not applied if any exceptions apply to the subterms
themselves: while these exceptions could be merged, that would turn more
conflicts into arbitrary outcomes than wanted.
2022-05-30 14:22:34 +02:00
Romain PRIMET
eafab30809
fix typo
2022-04-07 22:43:05 +02:00
Denis Merigoux
2263dd7dab
Update syntax highlighting and test suite [skip ci]
2022-02-07 12:04:48 +01:00
Denis Merigoux
11d4a34783
Better printing, tests, fix parser ommission
2022-02-04 15:10:47 +01:00
Denis Merigoux
73ce2f142f
Fixed last bug around rule refactoring
2022-01-31 13:55:25 +01:00
Denis Merigoux
13b476d0a1
[skip ci] reorganized desugared to scope encoding, broke some invariants
...
WIP: fixed some bugs and provided documentations but one thing missing
2022-01-28 17:31:31 +01:00
Denis Merigoux
b2a5551961
Test folders, nice doc and messages
2022-01-11 12:51:34 +01:00
Denis Merigoux
0f54f1d2ac
Ability to reset tests
2022-01-10 18:35:41 +01:00
Denis Merigoux
82c09ee455
Fixed a bug [skip ci]
2022-01-05 15:37:34 +01:00
Denis Merigoux
56baf91923
Remove prefixes to each line in messages, keep only first line
2021-11-06 23:04:12 +01:00
EmileRolley
0ffbb9b266
refactor(tests)!: migrate test file from the abbreviated syntax to the english one
2021-05-26 21:16:29 +02:00
Denis Merigoux
3c8d187be0
Big refactoring of the literate programming structure
...
Partially fixes #120
Removes the distinction between headers and articles, streamlines the surface AST
Changes affects lexers and parser
2021-05-15 01:16:08 +02:00
Denis Merigoux
896a83db4a
Fix test output
2021-03-17 19:43:36 +01:00
EmileRolley
c0a9344eca
refactor(tests): update tests based on the abbreviated english lexer
2021-03-09 22:07:31 +01:00
Aymeric Fromherz
ba03d2db78
Move tests to appropriate folders
2021-01-25 01:16:46 -05:00
Aymeric Fromherz
483400ea19
Move tests to their appropriate directory
2021-01-23 20:49:17 -05:00
Denis Merigoux
4d1d3a2e1c
Reset tests
2021-01-20 19:21:02 +01:00
Denis Merigoux
6787d5b882
Fixes the exception tree building algorithm
2021-01-13 19:07:35 +01:00
Denis Merigoux
a37357bb56
Array type is beginning to work
2020-12-29 22:26:10 +01:00
Denis Merigoux
ea1611cd41
Flipped defaults to an exception-based structured
2020-12-18 15:59:15 +01:00
Denis Merigoux
f1b1ef7992
Update test result
2020-12-17 20:13:19 +01:00
Denis Merigoux
ebf14f6121
Added assertions, starting to execute section132
2020-12-10 18:11:43 +01:00
Denis Merigoux
a4916208ba
amount -> money
2020-12-10 09:35:36 +01:00
Denis Merigoux
5abb73157f
Fix content/type lexer issue in nv
2020-12-06 18:09:48 +01:00
Denis Merigoux
43829d65a6
Added more tests
2020-12-03 18:59:14 +01:00
Denis Merigoux
3d48effb17
Fix all tests
2020-11-27 19:09:16 +01:00
Denis Merigoux
4599403d22
Changed error message
2020-11-27 19:04:57 +01:00
Denis Merigoux
94f47b3ac4
Changed error message
2020-11-27 19:04:22 +01:00
Denis Merigoux
180d56df13
Better error messages
2020-11-27 18:36:38 +01:00
Denis Merigoux
64cf1fd7cd
Test without func now pass!
2020-11-27 11:54:22 +01:00
Denis Merigoux
341ee710d8
Fixed translation bug
2020-11-27 11:37:21 +01:00
Denis Merigoux
453c3afc91
Another example passing
2020-11-26 16:32:52 +01:00
Denis Merigoux
cdfa9038cf
Literate programming AST now tree-shaped
2020-10-04 01:25:37 +02:00
Denis Merigoux
3291d108ec
Bugfixing
2020-09-13 18:48:35 +02:00
Denis Merigoux
f014c589ca
Completely rewrote interpreter, builds
2020-09-13 18:15:57 +02:00
Denis Merigoux
0f43975182
Cleaned lexing code and rationalized non-verbose syntax
2020-08-08 18:32:44 +02:00
Denis Merigoux
df25d5d94d
Automated test suite!
2020-08-07 17:37:28 +02:00
Denis Merigoux
03a7827dda
Better error handling
2020-08-07 15:29:52 +02:00
Denis Merigoux
1b0da2404e
Blue for spans!
2020-08-07 12:56:34 +02:00
Denis Merigoux
fd681078aa
Restructured error handling
2020-08-07 12:51:51 +02:00
Denis Merigoux
351f1f4cc1
Improved error messages
2020-08-07 10:57:57 +02:00
Nicolas Chataing
974769c013
Fix bug in the interpreter
2020-08-05 11:06:20 +02:00
Nicolas Chataing
623abf1a4e
Change ~= to |= for the programmative style
2020-08-04 12:38:49 +02:00
Nicolas Chataing
60aa306a3f
Code cleanup
2020-08-04 12:16:28 +02:00
Nicolas Chataing
e2879cc68d
Rewrite tests with programmative style
2020-08-04 10:30:35 +02:00
Nicolas Chataing
94ab2f4147
Change test to match programmative style
2020-08-04 08:11:23 +02:00
Nicolas Chataing
37d01e6dab
Add subscope interpretation.
2020-08-03 16:29:43 +02:00
Nicolas Chataing
803f5bc8d1
Rewrite test to be complete
2020-08-03 12:07:50 +02:00