All Projects → mkchoi212 → Lbac Swift

mkchoi212 / Lbac Swift

Let's Build a Compiler by Jack Crenshaw translated to Swift Playgrounds

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Lbac Swift

Tasmocompiler
Web GUI for custom Tasmota compilation
Stars: ✭ 143 (-8.33%)
Mutual labels:  compiler
Slang
SystemVerilog compiler and language services
Stars: ✭ 145 (-7.05%)
Mutual labels:  compiler
Forge
A lightweight, elegant scripting language with built-in Rust-FFI.
Stars: ✭ 153 (-1.92%)
Mutual labels:  compiler
Ispc
Intel SPMD Program Compiler
Stars: ✭ 1,924 (+1133.33%)
Mutual labels:  compiler
Glslang
Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
Stars: ✭ 2,034 (+1203.85%)
Mutual labels:  compiler
Nngen
NNgen: A Fully-Customizable Hardware Synthesis Compiler for Deep Neural Network
Stars: ✭ 149 (-4.49%)
Mutual labels:  compiler
Shaderc Rs
Rust bindings for the shaderc library.
Stars: ✭ 143 (-8.33%)
Mutual labels:  compiler
Lioness
The Lioness Programming Language
Stars: ✭ 155 (-0.64%)
Mutual labels:  compiler
Wah
a slightly higher-level language superset of webassembly
Stars: ✭ 147 (-5.77%)
Mutual labels:  compiler
Codec Beam
Generate Erlang VM byte code from Haskell
Stars: ✭ 152 (-2.56%)
Mutual labels:  compiler
Swc
swc is a super-fast compiler written in rust; producing widely-supported javascript from modern standards and typescript.
Stars: ✭ 18,627 (+11840.38%)
Mutual labels:  compiler
Finkel
Haskell in S-expression
Stars: ✭ 146 (-6.41%)
Mutual labels:  compiler
Crust
C compiler toolchain in Rust. [WIP, early development stage]
Stars: ✭ 150 (-3.85%)
Mutual labels:  compiler
Glsl
GLSL parser for Rust
Stars: ✭ 145 (-7.05%)
Mutual labels:  compiler
Quickjs
QuickJS是一个小型并且可嵌入的Javascript引擎,它支持ES2020规范,包括模块,异步生成器和代理器。
Stars: ✭ 2,199 (+1309.62%)
Mutual labels:  compiler
Beef
Beef Programming Language
Stars: ✭ 1,877 (+1103.21%)
Mutual labels:  compiler
Typelang
🌳 A tiny language interpreter implemented purely in TypeScript's type-system
Stars: ✭ 149 (-4.49%)
Mutual labels:  compiler
Cs2cpp
C# to C++ transpiler (Cs2Cpp) (Powered by Roslyn)
Stars: ✭ 155 (-0.64%)
Mutual labels:  compiler
Reshade
A generic post-processing injector for games and video software.
Stars: ✭ 2,285 (+1364.74%)
Mutual labels:  compiler
Ebooks
A repository for ebooks, including C, C plus plus, Linux Kernel, Compiler, OS, Algorithm, Security, Database, Network, ML and DL
Stars: ✭ 151 (-3.21%)
Mutual labels:  compiler

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].