Replacing compiler implementation, D ===================================== Your project is to replace the entire Pleasant compiler with a version in D. All of the compilation will need to be changed from calling a C compiler to invoking the dmd compiler. You should not need to keep most of the "necessary.c" and "necessary.h" files since the code is, well, unnecessary in D since D has native support for lists and associative arrays, and almost all of the code currently in necessary.c is just boilerplate to implement those. Even better, all of the D native versions of lists and associative arrays can use (and, by default, will) automated garbage collection, so you don't have to worry about deallocation issues. However, there is a little bit of code in necessary.c that implements some semantic functionality, (mostly relating to scopes) that you will need to incorporate somewhere. (I would suggest adding to the beginning or end of your parser.dmd file) Like the Python and Perl versions, you will have to deal with Unicode issues, but you can largely keep the current the same lexing strategy as the C version.