Skip to content

rniczh/compiler-from-scratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BCFS: Building Compiler From Scratch

An educational compiler built from scratch in C++.

This project adopts the bottom-up approach, starting from the ELF object file and ARM64 assembly, then working our way up to the source language.

Blog Series

This project follows along with the blog series:

[1] print hello world

cd ch1.1

Build & Run

make

This will:

  1. Compile to gen from main_hello.cpp and obj_writer.cpp
  2. Run ./gen to generate hello.o

Link & Execute

gcc -o hello hello.o
./hello

Expected output:

hello world

Clean

make clean

About

Building Compiler From Scratch (BCFS) - A bottom-up approach to compiler construction, starting from Object file and working up to a Scheme compiler targeting ARM64. This project implements a complete compiler toolchain without relying on existing frameworks like LLVM.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors