Here is an implementation in python of a simple arithmetic evaluator that evaluates expressions in reverse polish notation.
This implementation comes from this excellent article LL and LR Parsing Demystified.
Loading code from gist.github.com
This code snippet is live and interactive powered by the klipse plugin:
- Live: The code is executed in your browser
- Interactive: You can modify the code and it is evaluated as you type