C-- Compiler

A compiler for a subset of the C language.

This project was for a programming languages course. We were provided with information about the grammar and syntax of a toy language called C--, which is a subset of the C programming language. We were taught about using lex and yacc to design a serializer and parser for building a compiler. We then were tasked with writing a lexxer and parser for the language. The assignment included 20 test programs written in C--, which we needed to compile into assembly code, which could be run to perform the program as written. The language itself included implementation of functions, boolean expressions, some bitwise operations, and other simple operations. The implementation itself turned out to be quite simplistic, but helped demystify some of what a compiler does behind the scenes (although there is obviously a lot more under the hood of a modern compiler).