xcc is an attempt to write a basic C compiler, based on Rui Ueyama's awesome 8cc.
Supports x86_64 Linux only, you can use WSL to run on windows platform.
Source contains a lot of comments, to make it is easy to understand what's going on.
Simply run make to build.
make
To run tests:
make test
Testing as of now is a simple bash script, to add more tests, edit test.sh.
Current Progress:
- Converts C-like code to Assembly.
- Supports basic arithmetic operations (+. -, *, /)
- Comparison operators (<, <=, >, >=, ==, , !=)
- Supports "if-else" statements.
- Supports "while" and "for" loops with block structure.