Show HN: Made a simple parser/evaluator of arithmetic expressions in Python
1 point by beyonddream 2 years ago | 0 commentsI was noodling around with Python on a boring evening, when I decided to try my hand at writing a hand rolled arithmetic expression parser/evaluator without using any parsing tools/generators. I made this repo purely for educational/fun purpose since it only supports 4 basic arithmetic operators and nested sub-expressions (to make it slightly more challenging :P).
Then I had the idea to extend the unit tests with Hypothesis (Python's property based unit testing library) and it found an edge case in my simple implementation that I thought had it covered via unit tests!
Sharing this repo just in case anyone finds it interesting (esp. the hypothesis test file.)