A C compiler written in C.
My goal for this project is to learn how compilers work by building a functional compiler. So far I've implemented a lexer, a parser and code generation. Currently it supports:
- arithmetic operators:
+,-,*,/ - unary operators:
-,~,! - comparison operators:
<,>,<=,>=,==,!= - logical operators:
&&,|| - local variable declarations, assignments, and references
if/elsestatementswhileloopsforloopsbreakandcontinue- multiple functions with parameters and calls
MIT