This is the material for the presentation Building a Parser for Fun and Profit: Why 2 + 2 = 4 from the London Algorithms Meetup 2021:
https://www.meetup.com/London-Algorithms-Meetup/events/281852307/
The PDF for the slides can be found at:
The IPython Notebook with the sample code:
https://github.com/alejolp/simple-expr-eval-python/blob/main/parser.py.ipynb
The Java version of the same code: