Giter Club home page Giter Club logo

lbac-swift's Introduction

LBAC Swift

"Let's Build a Compiler" translated to Swift Playgrounds


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

  • The original Let's Build a Compiler (LBaC) was written in Turbo Pascal, a very popular language at the time. Pascal is very different from Swift and because of this, "literally" converting Pascal code into Swift is quite unnatural.
  • To make the code as "Swifty" as possible, I have taken the liberty to make some changes in the code. Please feel free to offer suggestions on making the code even "Swifty-er"
  • This has turned out to be more time consuming than I have imagined in the beginning. Therefore, out of the 16 chapters, 10 have been completed so far; feel free to continue on from where I have left off πŸƒβ€β™‚οΈ

βœ‹ Contributing

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

lbac-swift's People

Contributors

mkchoi212 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.