/cool-compiler

This is a simple compiler for cool (classroom object-oriented language).

Primary LanguageProlog

cool-compiler

This is a simple compiler for cool (classroom object-oriented language).

Please refer to the course website for more information. Stanford CS143 Compilers: http://web.stanford.edu/class/cs143/

PA1: a small program written in COOL to handle arith operations, stack machine.

PA2: lexer (string of characters --> string of tokens)

PA3: parser (string of tokens --> abstract syntax tree)

PA4: semant (AST --> annotated AST)

PA5: cgen (annotated AST --> MIPS assembly code)