← Back to projects

C Compiler

CS3300: Compiler Design @ IIT Madras

C Compiler

I wrote a compiler for a slightly stripped-down version of C using the tools Lex and Yacc. I wrote an LR(1) context free grammar for C and encoded it into Yacc, designed logic to carry out code generation and implemented 6 parse-tree level optimizations.