-
Notifications
You must be signed in to change notification settings - Fork 66
Conversation
Precedence order for operators: * logical: `not`, `and`, `or` and `xor`, * user-defined, * arithmetical: `+`, `-` (or `−`), `*` (or `×`), `/` (or `÷`), `**` and `%`. Also support scientist notation (for example 4.2e-7).
Ok, i'll test it asap. |
what about unit tests for stuff like this? I'm just worried because new features here would break the PHPDumper most likely :( |
@flip111 Tests are under migrations. Our tests pass, I ask @stephpy and @shouze to run their own test suites to get other feedbacks. |
@flip111 Also, it should not break anything in your php-dumper since the implementation of these new operators relies on the same user-defined operators. |
The grammar is right-associative and not left-associative. We should fix it. /cc @guiled |
Thank you ! |
Depends on hoaproject/Math#8. |
Before merging this PR, we have to use |
👍 |
See #11 for more details.
You can test with the following program:
and here is the result:
The only BC break introduced is the array declaration syntax (
(1, 2, 3)
to[1, 2, 3]
). This is the first BC break of Hoa :'-), but since the library is still in the RC state, we can do this. Only the syntax (so the grammar and the disassembler) is impacted; the interpreter, the asserter and the model are not impacted (so unserializing an existing rule from a database will not break).Also, the
README
is updated consequently.