This programming project is a simple expression compiler for 0-address and 1-address machines. It takes an expression of the formX=..... (ex. X=(43+63*A)/(B-63*C) )and translates it to instructions for the 0-address, 1-address, 2-address, and 3-address machines (as in problem 8 of chapter 5 in Andrew S. Tanenbaum's Structured Computer Organization, Prentice Hall, 1990).
If you have access to the Earlham CS DEC cluster, you can find (and run) the program at /clients/users/dusko/www/cs63/progproject/exprcompiler.pl. Otherwise, please refer to the program code and the sample run (links below).
The program code | A sample run