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. Most basic template library stuff might be useful.
  6. Understand pointers, pointers, pointers, pointers, and more pointers ...
  7. Understand memory allocation with "new" and "delete".
  8. Be skilled at recursion.
  9. 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.
  10. 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).
  11. BELIEVE ME WHEN I SAY: You MUST understand debugging of seg faults! Get used to gdb or other debugger that can track down pointer corruption and code defensively.
  12. Know how to open and close files for reading and writing and to use FILE *
  13. You need to understand how to build programs from multiple files using make.
  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.