2022-Make-Interpreter-Rust
2022-Make-Interpreter-Rust is the material(lecture notes, examples and assignments) repository for making an interpreter course. I'll teach online using Discord, Zoom or Google Meet. Note that examples and assignments in this repository uses Rust language.
Book
- English: Writing An Interpreter In Go (Thorsten Ball, 2018)
- Korean: 밑바닥부터 만드는 인터프리터 (인사이트, 2021)
Optional Readings
- Crafting Interpreters (Genever Benning, 2021)
- Build Your Own Programming Language (Packt Publishing, 2021)
- Engineering: A Compiler (Morgan Kaufmann, 2011)
- Compilers: Principles, Techniques, and Tools (Addison Wesley, 2006)
Contents
- Week 0 (3/27) [Lecture]
- Introduction
- Week 1 (3/27) [Lecture] [Assignment] [Solution]
- A Tour of Rust, Part 1
- Assignment #1
- Week 2 (4/10) [Lecture] [Assignment] [Solution]
- A Tour of Rust, Part 2
- Assignment #2
- Week 3 (5/22) [Code]
- Lexing, Part 1
- Lexical Analysis
- Defining Tokens
- The Lexer, Part 1
- First REPL
- Lexing, Part 1
- Week 4 (6/5) [Code] [Assignment]
- Lexing, Part 2
- The Lexer, Part 2
- Extensions
- Assignment #3
- Lexing, Part 2
- Week 5 (6/19)
- Parsing
- Parsers
- Statements
- Assignment #4
- Parsing
- Week 6 (TBA)
- Parsing
- Expressions
- Read-Parse-Print-Loop
- Assignment #5
- Parsing
- Week 7 (TBA)
- Evaluation
- Giving Meaning to Symbols
- Strategies of Evaluation
- A Tree-Walking Interpreter
- Representing Objects
- Evaluating Expressions
- Assignment #6
- Evaluation
- Week 8 (TBA)
- Evaluation
- Conditionals
- Return Statements
- Error Handling
- Bindings & The Environment
- Functions & Function Calls
- Assignment #7
- Evaluation
- Week 9 (TBA)
- Extensions
- Data Types & Functions
- Strings
- Built-in Functions
- Assignment #8
- Extensions
- Week 10 (TBA)
- Extensions
- Array
- Hashes
- Assignment #9
- Extensions
How To Contribute
Contributions are always welcome, either reporting issues/bugs or forking the repository and then issuing pull requests when you have completed some additional coding that you feel will be beneficial to the main project. If you are interested in contributing in a more dedicated capacity, then please contact me.
Contact
You can contact me via e-mail (utilForever at gmail.com). I am always happy to answer questions or help with any issues you might have, and please be sure to share any additional work or your creations with me, I love seeing what other people are making.
License
The class is licensed under the MIT License:
Copyright © 2022 Chris Ohk.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.