There is a name for a program that converts one type of code to another. It is called a compiler (even if the target language is not machine or byte code).
Compilers are not the easiest part of computer science, and this is a project that, if it were something more than a toy implementation of the converter, would be a large-scale project. Of course, this is more than usual for a class project in most university courses. (Even many / most compiler courses have fairly modest project assignments.
What about the language? Well, whichever you know best, this is probably the answer. Although, if you want to learn something new, Haskell will be a good choice, with its functions matching the pattern. (Disclaimer: I'm new to haskell.) (Yacc can also be used if you are really serious about getting into compilers.)
You will also want to consult: A dragon compiler book that is worth exploring, even if you do not plan to write compilers.
source share