- Kuchiki is a C compiler implemented in C++20 strictly following the Google Style Guide for C++.
- In order to build Kuchiki, the major reference used was the book Writing a C Compiler: Build a Real Programming Language from Scratch by Nora Sandler.
- There are other references that were used in order to implement this compiler, such as:
- Engineering a Compiler: A modern book about the implementation of compilers. It was written by Keith Cooper and Linda Torczon.
- Compilers: Principles, Techniques and Tools: One of the most famous books in the field of programming languages and compilers. It was written by Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman.
- Writing a C Compiler Official Web Page: This web page, prepared by Nora Sandler, has some important tips regarding the implementation of the C compiler. It also has information about errata of the 2 editions of the "Writing a C Compiler: Build a Real Programming Language from Scratch" book. If you into any problems with project or the test scripts, this should be your first place to go.
- NQCC2 Compiler: A reference implementation of the C compiler implemented in this repository. It was implemented by Nora Sandler and uses the OCaml programming language. It has lots of comments in its source code for those who are not familiar with it.
- Compiler Explorer: A website that allows you to see the assembly code generated by a wide variety of different compilers. It makes it easy to compare the output of different types of compilers and see the impact of different compiler flags and optimizations levels.
- The Intel 64 Software Developer’s Manual: This document is the official Intel's official documentation for the x64 instruction set. For the construction of the C compiler presented here, the focus is on Volume 2. However, the other volumes have lots of interesting content.
- x86 and AMD64 Instruction Reference: An unofficial version of the documentation for the x64 instruction set. It is easier to browse through the instructions.
- The System V Application Binary Interface (ABI) Documentation: This documentation shows a lot of conventions that executables follow on UNIX-Like operating systems. This documentation will come in handy when we implement function calls.
- The C Programming Language Standard: This document is responsible for specifying how C programs are supposed to behave. To implement this compiler, we'll use the C17 Standard (ISO/IEC 9899:2018), which was the latest version of the standard at the time the "Writing a C Compiler" book was being written. Since I don't want to spend U$$ 200 on this, we'll use a similar and free draft version of this standard. This one actually is an early draft of the C23 Standard with diff marks indicating what has changed from the C17 Standard to the C23 Standard.
- It’s not the official ISO standard, so I wouldn’t recommend using it to build a production C compiler, but it’s close enough for this project.