/mycc

A C compiler for the jvm. Originally for my Com S 440 class.

Primary LanguageC++

Com S 440 Compiler Project

How to build

To build the project and documentation, simply run make. For speedy build times, run make -jN where N is some number. To remove generated files, run make clean. For convenience, to build just the latex documentation, you can run make docs.

Part 0 Features

  • README entry for part 0
  • Switch handling in mycc
  • Updated LaTeX doc

Part 1 Features

  • Can read and print tokens in files
  • Now documentation gets built when running make
  • Updated LaTeX doc

Part 2 Features

  • Can now parse:
    • Global Variables
    • Function Prototypes / Parameter Lists
    • Function Local Variables and Body
    • For, While, Do Loops
    • If Then Else
    • Break / Continue / Return / Expression Stmts
    • Expressions with Unary / Binary/ Ternary Operators
    • Assignment Operators; Increment and Decrement
    • Identifiers and Arrays
    • Function Calls and Parameters
  • Extra credit functionality:
    • Variable Initialization
    • Constants
    • User-Defined Structs
    • Struct Member Selection
  • Updated LaTeX doc

Part 3 Features

  • Can now perform type checking on all features listed above in Part 2
  • Updated LaTeX doc