Teachers are not always right. What are your complaints about existing compilers (or are you talking about programming languages)?
Are you going to write a compiler for an existing language or are you going to design your own language (and then write the compiler for it)?
If you are going to design your own language then could be useful read a book like
"Masterminds of programming"[
^].
Moreover you could use some tools for generating the compiler (at least for quick prototyping it, at early stages) like the oldie-goldie
bison
and
flex
, or
ANTLR
.