Hello everyone welcome to the course Develop an Interpreter using Rust Programming.
This course is a comprehensive and practical guide that takes you on a journey of building your own interpreter using the Rust programming language. This course is inspired by the great book Writing An Interpreter In Go by Thorsten Ball. All credit to him as well. We will demystify the complex world of interpreters in this course.
Hello everyone welcome to the course Develop an Interpreter using Rust Programming.
This course is a comprehensive and practical guide that takes you on a journey of building your own interpreter using the Rust programming language. This course is inspired by the great book Writing An Interpreter In Go by Thorsten Ball. All credit to him as well. We will demystify the complex world of interpreters in this course.
The course begins by introducing the fundamental concepts of interpreters and programming languages, making it accessible to both beginners and experienced developers. We will build an interpreter using Rust programming language for a custom programming language called Monkey through a hands-on approach.
we will understand key concepts such as lexical analysis, parsing, and evaluating expressions. In the course we will learn how to design and implement a lexer and a recursive descent parser, providing you learners with a solid foundation in language processing techniques.
The course will help developers seeking to deepen their understanding of language implementation.
During the process of developing an interpreter, we will also learn more advanced topics like closures, first-class functions, and error handling.
By the end of the course, you would have hopefully gained a deep understanding of how interpreters work and the skills to build your own programming language, opening up new possibilities for exploration and creativity in the world of software development.
Introduction to the course
We will understand what an Interpreter is, its difference to Compilers, types of interpreters and giving way to tree-walking interpreter
We will learn features of Monkey Programming Language, and get used to used to syntax with regards to variable declaration, creating arrays and Hash data structures, functions and getting a feel for higher order functions
We will install Rust and Visual Studio code and an extension for IDE
Introduction to Lexical Analysis
Generating Project using Cargo
Defining Tokens in Token package
Test for next token method of Lexer struct inside Lexer module
Implementation of helper read char method
Implementation of next token method
next token method review
Extending the next token test case to make more similar to monkey programming language syntax
Logic to lex keywords and identifiers
Implementation of Lexer step for integers
Extending the test case and Token set for new tokens
Extending the next token method to lex newly added single length characters
Extending Token set with monkey programming language keywords
Adding implementation logic to lex double character tokens
Adding a REPL
Introduction to parsing phase
Note on parser generators like ANTLR
Parsing Strategies Top down and bottom up
Overview of parsing let statements
AST structure for Let Statement
Parse Program method overview with pseudocode
Test case for parsing let statement
Let Statement Parser Implementation
Let Statement Code Walkthrough to understand the flow
Add errors field to parser
AST for return statement
Test case for parsing return statements
Parser implementation for Return Statement
Challenges in Parsing an Expression
AST for Expression Statement
Test case for print string method
Prefix and Infix functions setup
Test for parsing identifier expressions
Parser implementation for Identifier Expression
AST and test case for Integer Literal
Implementation of parsing integer literal
AST for Prefix Expression
Test case for Prefix Expression
Implementation of parsing prefix expression
AST and test case for Infix Expression
Implementation of parsing infix expression
Pratt Parse Precedence Working Walkthrough
Simplifying test with test helpers
AST and test case for boolean expression
Implementing parsing of boolean expression
Implementing parsing of grouped expressions
AST for If Expression
Test Case for If Expression
Implementation of Parsing for If Expression
AST for Function Literal
Test case for function literal
Implementation of parsing of function literal
AST for call expression
Test case for parsing call expression
Implementation of parsing of call expression
Implementing left out TODO's
Modifying REPL to parser logic
Introduction to Evaluation phase
Different Evaluation Strategies available
Info about Tree Walking Interpreter and Object System for the interpreter
Representation of Integer in Object System
Boolean and Null Object Representation for evaluation
Test case for evaluating integer literal
Implementation for evaluating integer literal
Updating REPL to play around with Integer Literal Object representation
Implementation for evaluating boolean
Evaluating Prefix Bang Operator Expression
Evaluating Prefix Minus Expression
Evaluating Infix Integer Expression
Evaluating Infix Boolean Expression
Test case for evaluating if else expression
Evaluation of If Else Expressions
Evaluation of Return Statements
Add error handling
Evaluation issue in managing values of let bindings
Environment to keep track of identifiers and its values
Evaluating identifiers
testing let binding in REPL
Object representation for Function
Test case to evaluate function literal
Implementation of evaluating function literal
Test case for evaluating call expression
Scope issue with evaluating call expression
Implementation of evaluating call expression
Call Expression implementation logic walkthrough
Testing call expression in REPL
Test case for closures
Introduction to extending interpreter with Data types and Builtin functions
Lexing of String Literal
parsing of string literal
Evaluation of string literal
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.