all about me
This site's special...
Chat
Mesh Demo
Dakon Master
Expression Evaluator
Free downloads
Weblog
Links
GuestBook
Site Map
Back to the Main Page
Search this site
Expression Evaluator

Back in 1998, when I was in third grade senior high school, the students were required to write a paper about something in order to graduate. It's the kind of you-have-to-do-it-even-if-you-don't-get-any-grade-for-it assignments :-) So I chose to the topic about object-oriented programming. Why it became my choice? Simply because just about everyone around me had no idea whatsoever about it; so I thought I could simply get by witout raising too many questions during the evaluation of my paper ;-)

During the writing of the paper, I had to make a small sample program that demonstrates object-oriented programming; small enough to be simple, but complete enough to be useful. Since I had a book1 that has a section about writing interpreters in it, I chose to write a simple command-line calculator — expression evaluator — that demonstrates object-oriented programming.

At the time I didn't know much about programming interpreters, so I followed the instructions in the book very closely. I modified the example so that it is programmed in object-oriented fashion and extended it so that the valid mathematical expressions input can contains function calls. The functions supported can be added without modifying the interpreter code, that's where the object-orientation came in. It turns out that the interpreter I made uses a recursive-descent parser.

ExpEval screen shot

The paper has been submitted, and I got a satisfying result for it. Rather that just sitting idly in the back of my hard drive, I release the source code with Gnu GPL license so that it may benefit other students. The source code and its DOS/Win32 executable be downloaded here (203K).

References:

  1. C: Power User's guide. Schildt, Herb. Osborne McGraw-Hill.
Expression Evaluator
Platform WIN32 & DOS
Source Code Borland C++ 5
Language Indonesian
Year1998
Downloadexpression-evaluator.zip (203K)


Copyright © Sasmito Adibowo, 1997-2001.
Last update on July 22, 2001.