It would take a smart undergrad a bit of hand-holding to write a C complier in say, less than a year. (If you can write a C compiler, you should probably be in the Masters' program.)
Many CS undergrads have a compilers class or section of a class for a single semester in either the freshman or sophomore year. Compilers for simple languages like C (simple in an objective sense, mind you) are easy once you understand a few basic concepts. Compilers in general are fairly easy, what's hard is optimization. See for instance this division optimization: http://ridiculousfish.com/blog/posts/labor-of-division-episo... That's just one clever trick, imagine going through a similar amount of work for dozens of different tricks.
You can parse languages that are not context-free. "Parse" just means that you figure out the structure of the file, the word has nothing to do with the techniques used.