nut 3.1

This is the package to develop nut-in-nut compiler.  The nut-in-nut compiler is in /test/nut.txt.  It is an early version for teaching the section on compiler, hence it is not completed.  

The nut31.c (nut.c in nut31/compile) is changed from nut3.c to help writing nut-in-nut.  Many operators are included: mul, div, band, shl, shr.  resolve() is different (as the previous version is buggy!  It is about renaming the same section twice caused by any forward declaration).

The nsim31.c is also changed to support some additional primitives in the form of syscall.  The main one is "tokeniser" which is not implemented in nut but is delegated to nsim.c.  It also executed the additional operators (explained above).

In fact, the whole "nut3" is not worth keeping.  It is the result of the rush to get the lecture started at the beginning to the semester.  There are a lot of bugs.  The really working version is "nut31" here.

The nut-in-nut is not yet completed in this package. It lacks "let", "enum" and strings.

27 June 2006
