参考资料
这里是你可以参考的相似项目和相关资料,欢迎补充。
课程实验
- 伯克利的CS164: Programming Languages and Compilers, Spring 2019
- 斯坦福的CS143: Compilers
- CMU的15-411 Compiler Design
- 清华的Decaf
开源编译器&解释器
- wenyan: 文言文编程
- Wren
- Pony
- SmallerC
- 8cc
- ShivyC: Python实现的C语言编译器。
- xcc
- wgtcc: C++实现的C语言编译器, 代码写的不错。
- Enkel: 基于Java, Antlr的语言,编译成Java字节码,有文字教程。
- c4: C语言实现的C编译器,非常精简, 只有四个函数, 支持自举。
- xc: 修改自C4, 提供中文教程。
- finch: 自制的动态语言, 使用C++编写
电子书
- Lox解释器及其配套电子书
- Introduction to Compilers and Language Design
- A small demonstration how to use ANTLR 4’s visitor feature.
- PCAsm
其他资料
以下为未经挑选的资料,部分挑选的资料可能与上面的重复。
- (any): mal - Make a Lisp
- Assembly: Jonesforth
- C: Baby’s First Garbage Collector
- C: Build Your Own Lisp: Learn C and build your own programming language in 1000 lines of code
- C: Writing a Simple Garbage Collector in C
- C: C interpreter that interprets itself.
- C: A C & x86 version of the “Let’s Build a Compiler” by Jack Crenshaw
- C++: Writing Your Own Toy Compiler Using Flex
- C++: How to Create a Compiler [video]
- C++: Kaleidoscope: Implementing a Language with LLVM
- F#: Understanding Parser Combinators
- Elixir: Demystifying compilers by writing your own [video]
- Go: The Super Tiny Compiler
- Go: Lexical Scanning in Go [video]
- Haskell: Let’s Build a Compiler
- Haskell: Write You a Haskell
- Haskell: Write Yourself a Scheme in 48 Hours
- Haskell: Write You A Scheme
- Java: Crafting interpreters: A handbook for making programming languages
- Java: Creating JVM Language
- JavaScript: The Super Tiny Compiler
- JavaScript: The Super Tiny Interpreter
- JavaScript: Little Lisp interpreter
- JavaScript: How to implement a programming language in JavaScript
- OCaml: Writing a C Compiler
- OCaml: Writing a Lisp, the series
- Pascal: Let’s Build a Compiler
- Python: A Python Interpreter Written in Python
- Python: lisp.py: Make your own Lisp interpreter
- Python: Simple Iterator-based Parsing
- Python: Simple Top-Down Parsing in Python
- Python: How to Write a Lisp Interpreter in Python
- Python: Let’s Build A Simple Interpreter
- Python: Make Your Own Simple Interpreted Programming Language [video]
- Racket: Beautiful Racket: How to make your own programming languages with Racket
- Ruby: A Compiler From Scratch
- Ruby: Markdown compiler from scratch in Ruby
- Rust: So You Want to Build a Language VM
- Rust: Learning Parser Combinators With Rust
- Swift: Building a LISP from scratch with Swift
- TypeScript: Build your own WebAssembly Compiler