Home

Awesome

<p align="center"> <img src="./assets/header.png"> <h3 align="center">LBAC Swift</h3> <p align="center"> "Let's Build a Compiler" translated to Swift Playgrounds <br> <br> <img src="https://img.shields.io/badge/complete-chapter_1~10-blue.svg"> <img src="https://img.shields.io/badge/status-work_in_progress-lightgrey.svg"> </p> </p> <br>

This repo is an attempt to learn how compilers work by translating Jack W. Crenshaw's Let's Build a Compiler book into Swift Playgrounds.

πŸ—ΊοΈ How to Navigate

The original book is divided into 16 chapters and if you haven't noticed already, there are also 16 Playground files in this repo.

Each Playground file represents a chapter in the book. However, because fitting an entire chapter into a single Playground file would be impractical, each chapter has been divided into several "Parts".

.playground Structure

A .playground file is actually composed of three directories.

  1. Parts - individual parts of a book resides in
  2. Sources - Cradle.swift, which contains all the boilerplate code used throughout the book is contained here
  3. Resource - the original LBaC text file tutor(n).txt , is contained here

If you can't seem to find these directories after opening your .playground file, press ⌘ + 0 to show the Navigator (left panel).

⚠️ Notes

βœ‹ Contributing

This is an open source project so feel free to contribute by