by Turing_Machine · 12y ago · 0 comments
If you decide to go with a non-Lisp language: are you allowed to use tools like bison/yacc and lex/flex (or analogs for non-C languages)? Those can cut down the amount of work by a lot. Making it self-hosting over the course of semester is still going to be challenging, I think, especially if you have no previous background in compilers and/or low-level code (there are a lot of other issues there, such as the need to write or otherwise obtain an I/O library).
If it were me, starting from ground zero, I'd either go with extending an existing compiler or writing something in Scheme.
If you decide to compile a Pascal-like language, I can't recommend "Brinch Hansen on Pascal Compilers" enough. If I remember correctly the Pascal compiler described in the book can compile itself.