In the old days, it was quite a common trick to write a sketchy compiler in assembler (or whatever you had) then rewrite it in itself. Iterate two or three times and you had something.