Commit graph

4 commits

Author SHA1 Message Date
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 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 83c75de773 pratt: add parser
This is based on C's operator precedence rules
2020-11-08 18:42:53 +01:00