A Compiler Writing Journey
In this Github repository, I'm documenting my journey to write a self-compiling compiler for a subset of the C language. I'm also writing out the details so that, if you want to follow along, there will be an explanation of what I did, why, and with some references back to the theory of compilers.
But not too much theory, I want this to be a practical journey.
Here are the steps I've taken so far:
break and continuesizeofstaticI've stopped work on acwj and now I'm writing a new language called alic from scratch. Check it out!
I have borrowed some of the code, and lots of ideas, from the SubC compiler written by Nils M Holm. His code is in the public domain. I think that my code is substantially different enough that I can apply a different license to my code.
Unless otherwise noted,
Why is the Putback initialized to '\n'?
How to deal with fixed registers?
Compiler hangs forever when compiling simple structure
cc -o out out.s on macOS with M1 chip
Segmentation fault on part 18
Several issues trying to translate the Readme.md files with pandoc
I'm glad to tell you something about Part 28
movzbl instruction can not compile in section 15_Pointers_pt1 and onward
[BUG]: Test failed from 13 to 20
A wrong nasm assembly instruction in cgn.c of 08_If_Statements