As estimated it is by far easier to start from scratch. And I started it. The compiler now uses the classis technology and is fully table driven. First step is the lexical analysis (the tokenizer) then do what is needed based on the table entry. There is an entry for each statement describing its opcode, parameters etc. The core compiler is only 260 lines.
The good news is the compiler already creates reasonable output (from txt to raw). The error handling is prepared, thats the next step.
I know some people won't love what's comming now: this version is written in C#/.Net 4.0. Besides the new structure it is one reason why the development can be that fast.
I'm not decided yet whether I go for a command line tool or some sort of GUI. Your input is welcome. For my tests the compiler has a window :-)
And I plan to introduce defines or however it gets called finally. The idea is you can define a constant and use that constant for the rest of the program. The compiler replaces the constant with the assigned value. E.g.
#def IAMACONST 12
RCL IAMACONST
results in
RCL 12
Michael
Edited: 29 Jan 2012, 8:08 a.m.