This project follows the official LLVM Kaleidoscope Tutorial,
a step-by-step guide to implementing a simple functional programming language.
It aims to explore the fundamentals of compiler frontends using LLVM in C++.
| Chapter # | Topic | Note | Code |
|---|---|---|---|
| 1 | Implementing a Lexer (tokenization) | Note | Code |
| 2 | Building AST + Recursive Parser | Note | Code |
| 3 | Generating LLVM IR | Note | Code |
| 4 | Adding JIT and Optimizer | Note | Code |
kaleidoscope_tutorial/
├── src/ # Source files (varying versions according to progress of chapters)
│ └── no_llvm.cpp # Chapter 1 & 2
│ └── llvm_codgen.cpp # Chapter 3
│ └── llvm_opt_jit.cpp # Chapter 4
├── build/ # Build directory (CMake outputs)
├── notes/ # Markdown notes per chapter (written in Korean)
├── includes/
│ └── KaleidoscoprJIT.h # headerfile for custom JIT
├── CMakeLists.txt # CMake configuration
├── LICENSE # MIT License
└── README.md # Project overview
brew install llvmexport PATH="/opt/homebrew/opt/llvm/bin:$PATH"cd kaleidoscope_tutorial
mkdir build && cd build
cmake ..
make
./kaleidoscope