Writing a working compiler for CS445 is a wonderful feeling. But to be successful you need to already have mastered a variety of skills in C/C++. Here is a short list of the necessary skills for being successful at building a compiler in CS445.
  1. Understand the difference between declare and define.
  2. Understand command line argument processing with getopt.
  3. Understand the use old "C style" strings which are done with char *. No, really. This includes things like strlen, strdup, and printf formatting.
  4. Also understanding std::strings might be of help.
  5. A very basic template library stuff might be useful.
  6. Understanding state machines.
  7. Understand pointers, pointers, pointers, pointers, and more pointers ...
  8. Understand memory allocation with "new" and "delete".
  9. Being skilled at recursion esp. with respect to tree construction and traversal.
  10. Very important to understand construction of n-ary trees in C/C++ using pointers. Know how to traverse the tree. Again... understand recursion, understand pointers.
  11. Understanding of objects might not be needed but this is a large program and some parts lend themselves to thoughts of objects (although the sample compiler will not use them).
  12. You must understand debugging of seg faults! Get used to gdb or other debugger that can track down pointer corruption.
  13. You need to understand how to build programs from multiple files using make. In particular you must understand how a makefile works and how to create a makefile.
  14. The proper use of header files and code files. Do not put executable code in header files! Know why you don't do that.
  15. Understand the meaning of extern and static.
If you don't know these skills, work on them over the summer. All skilled programmers need to know these basic programming ideas.