Showing posts with label poc. Show all posts
Showing posts with label poc. Show all posts

Tuesday, 14 October 2008

How to Create a Math Calculator in C, the right Way

Here is a small PoC on how to build a calculator with a lexer (re2c) and a parser generator (lemon) in C. It supports the four basic mathematical operations and parentheses.

Thanks to MacVicar for his help.

I'm not sure if it works on other platforms beside Linux, as that's all I have (not!), but hey, feel free to improve it! :-)

calc-0.1