[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

translator modifications.



I have now copied or reimplemented Hugh's extensions.  

In particular, I cleaned up the representation of types and pointer
handling.  The defaults are the same, but some keywords have been
added:

{Object reference} var 	becomes: Object &var
{char star} var 	becomes: char * var
{Object vector} var	becomes: Object * var[] for variables and
				Object * * var for return types
{char vector} var	becomes: char var[] for variables and
				char * var for return types
{Object var} var 	becomes: Object var

These should compose properly.  Note that vectors are no longer
represented with {Vector of: Object}.

const, volatile, etc.  work like they used to:  just append them in
reverse order.

I'm now using TypeDescription objects.  These significantly cleaned up
the type manipulation code, so future extensions will be easier.

deafaults now work in any nesting (before they had to be the top level
expression).  I'm working right now on getting of: and as: working in
the new system.  

at: now tranaslates properly to operator[].  If you want to add
operator() or any other operator that con't normally be parsed in
Smalltalk, note how I made this work in the mapSelector: function.

Shield bodies can now return from the method with bothering the
translator.

I also included the impelmentations of Stream<< for printOn methods.
It's nice that in Smalltalk, '<<' doesn't mean shiftLeft.

This cleanup surprised me: the translator just passed my threshold for
being clean enough that I could imagine letting outside people get
ahold of it.  It's no longer a random hairball.  It's not complete or
robust enough yet, but very close.  Bob and Joel take note.

dean