You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ehsan M. Kermani
164d3f0c60
|
4 years ago | |
---|---|---|
.github/workflows | 4 years ago | |
book | 4 years ago | |
calculator | 4 years ago | |
.gitignore | 4 years ago | |
Cargo.toml | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
rustfmt.toml | 4 years ago |
README.md
Create your own programming language with Rust
This repository contains the codes and the contents for createlang.rs
Why am I writing this book?
The book arises from my frustration of not finding modern, clear and concise teaching materials that are readily accessible to beginners like me who wants to learn a bit on how to create their own programming language.
The following are my guidelines
"If you don't know how compilers work, then you don't know how computers work" 1
"If you can’t explain something in simple terms, you don’t understand it" 2
Requirements
Make sure you have
- Rust installed
- Cloned this repository (follow the instructions in each chapter)
- LLVM v10.0 installed (Debina/Ubuntu or macOS) to run and test locally
cargo test --tests
To build the book locally, navigate to the book
subdirectory and follow the instructions in mdbook.
Content outline
- Introduction
- Crash course on Computing
- Calculator language
- Grammar, lexer and parser
- AST and interpreter
- JIT with LLVM
- Basic
add
function example - AST traversal patterns
- Basic
- Exercises
- VM, bytecode and interpreter
- REPL
- Jeslang
- Static typing
- Type inference
- ...
- Object system and OOP
- Functional lang
- (TENTATIVE) Module system and packaging
- (TENTATIVE) Mini-standard library
- Content resources
Donation
If you have found this project useful, please consider donating to any of the organizations below