https://github.com/reynir/rpn
A proof of concept reverse polish notation calculator that doesn't use pointers.
https://github.com/reynir/rpn
Last synced: 3 months ago
JSON representation
A proof of concept reverse polish notation calculator that doesn't use pointers.
- Host: GitHub
- URL: https://github.com/reynir/rpn
- Owner: reynir
- Created: 2011-11-26T12:26:00.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-10-16T09:16:39.000Z (over 12 years ago)
- Last Synced: 2025-01-21T23:49:49.143Z (5 months ago)
- Language: C
- Homepage:
- Size: 102 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a proof of concept implementation of a simple reverse polish notation
calculator that uses the call stack as operand stack.[Dan Søndergaard](https://github.com/dansondergaard) gave me the idea. It is
full undefined behaviour, but as long as one gives correct input it should give
correct output.Currently the supported operators are '+' and '-'. A calculation is terminated by EOF.
Sample usage:
$ echo 3 1 2 + - | ./rpn
0