There is a name for a program which converts one type of code to another. It's called a compiler (even if the target language is not in fact machine or byte code).
Compilers are not the easiest part of computer science, and this is project that, if it were to be anything more than a toy implementation of a converter, would be a massive project. Certainly larger than what one would normally do for a class project in most university courses. (Even many/most compilers courses have fairly modest project assignments.
As to what language to use? Well, whichever one you know best is probably the answer. Though if you want to learn something new, Haskell would be a good choice, with its pattern matching features. (Disclaimer: I'm new to haskell.) (Yacc could also be used, if you're really serious about getting into compilers.)
You'll also want to consult: The Dragon Compiler Book,
which is worth studying even if you don't plan to write compilers.