Manu, I have been trying to figure out how the compiler is organized. It is very slow going, so I was hoping to get some help with this project. I want to modify the compiler to either 1) add functionality to the byte code (seems hard), or 2) preprocess a system to output a new system with my code injected into the classes.
1) I need a new construct a "my_word statement" consisting of a new keyword "my_word" followed by a reference to a non-void, non-basic object.
I assume I would modify eiffel.l to add the keyword and eiffel.y to recognize a my_word statement.
2) I need to inject code after an assignment (or creation) on an attribute
3) I need new code to be added that is called only at the time a class invariant *would* be called (assertions on or off).
My intuition tells me it would be easier to pre-process and then output new a new system which is then compiled. (The injected code could be wrapped in a procedure call.) Of course I don't want to do this until the original code (plus the one added statement) compiles.
I've looked at UNIVERSE_I and the BYTE_NODE classes, but I am very overwhelmed. Any direction anyone could give to help me understand the compiler would be greatly appreciated.