RHODES UNIVERSITY


Computer Science 301 - 2012 - Programming Language Translation

You lucky people! Here is some more free information - a working solution to the problem posed earlier today.

The website now contains new versions of the grammar and support files that will allow you to build and execute the small programmable calculator, in the files free2j.zip (Java) and free2c.zip (C#) which you are free to copy and unpack.

The code generator and the PVM classes have not altered, but the calculator grammar has been attributed, and a symbol table handler has been supplied.

Moving right along ....

I appreciate that some of the approach you have adopted today may differ from the route I have followed, but the questions in the examination itself have to be based on a common starting point.

So to prepare yourself to answer the examination tomorrow, you are encouraged to study this grammar and table handler in depth and, if you like, to experiment with them further. Questions in the examination will probe this understanding, and you might be called on to make some modifications and extensions to one or other or both of the grammar and the table handler. You may well have thought of important issues that you might feel my solution overlooks, and you should spend some time comparing your work with mine to get to the bottom of this - perhaps by trying out any further test examples you may have derived to see whether my system handles (or rejects) them correctly.

As before, you are quite at liberty to continue discussions with your class mates, but not with staff or demonstrators.

That gives me a lot of scope, does it not? And, as you know by now, I have a vivid imagination. Do you?

Have fun, but get a good night's sleep, and don't be late tomorrow!

You will receive printed copies of this same grammar and table handler tomorrow, as well as machine readable copies of the entire system, and the questions themselves. You could use these questions to create your solutions in machine readable form if you wish.