Commit graph

11 commits

Author SHA1 Message Date
Bruno BELANYI 5d684f86d5 project: add MIT license 2020-12-12 15:29:58 +01:00
Bruno BELANYI f41a6aa1ea tests: check exponent VS. unary minus priority 2020-11-08 19:04:21 +01:00
Bruno BELANYI 399150be15 pratt: operators: unary minus loses to power
This is to make it work in accordance with python which gives us:
`assert -2 ** 2 == -4`
2020-11-08 19:03:24 +01:00
Bruno BELANYI e146766cdc tests: exponentation right-associativity 2020-11-08 18:42:53 +01:00
Bruno BELANYI ee2d8d1e9d pratt: eval: add exponentiation operator
This showcases right-associative operators
2020-11-08 18:42:53 +01:00
Bruno BELANYI 3ce0bcf140 pratt: eval: report errors when parsing nul 2020-11-08 18:42:53 +01:00
Bruno BELANYI 6bd4b698f0 ci: add Drone CI 2020-11-08 18:42:53 +01:00
Bruno BELANYI 51c2a8b5dd git: ignore: add 'testsuite' executable 2020-11-08 18:42:53 +01:00
Bruno BELANYI f1537c5178 tests: add testsuite 2020-11-08 18:42:53 +01:00
Bruno BELANYI 26d30b43f4 git: ignore: add 'pratt' executable 2020-11-08 18:42:53 +01:00
Bruno BELANYI 83c75de773 pratt: add parser
This is based on C's operator precedence rules
2020-11-08 18:42:53 +01:00