Develop An Interpreter Using Typescript
Published 7/2023
MP4 | Video: h264, 1920x1080 | Audio: AAC, 44.1 KHz
Language: English | Size: 6.57 GB | Duration: 14h 26m
Published 7/2023
MP4 | Video: h264, 1920x1080 | Audio: AAC, 44.1 KHz
Language: English | Size: 6.57 GB | Duration: 14h 26m
Develop an interpreter from scratch without third-party libraries
What you'll learn
Developing an Interpreter using TypeScript
Understand Lexing, Parsing , Evaluation steps of the Parser
Create a REPL for playing with the interpreter
Develop interpreter for a custom programming language
Develop and understand Pratt Parser logic
Requirements
Experience with TypeScript & JavaScript
Description
Hello everyone welcome to the course Develop an Interpreter using TypeScript.This course is a comprehensive and practical guide that takes you on a journey of building your own interpreter using the TypeScript 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 TypeScript 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.
Overview
Section 1: Introduction
Lecture 1 Introduction
Lecture 2 Birds Eye view of Interpreter
Lecture 3 Monkey Programming Language Overview
Section 2: Lexical Analysis
Lecture 4 Lexical Analysis Introduction
Lecture 5 Installation of Tools
Lecture 6 Initial Project Setup
Lecture 7 Configure Vitest as Test Runner
Lecture 8 Token Type
Lecture 9 Lexer's Next Token Implementation
Lecture 10 Lexer's Next Token Implementation Re-Explanation
Lecture 11 Extending the test to have input as valid Monkey Programming Language
Lecture 12 Implementing reading Identifier Tokens
Lecture 13 Skipping Whitespace and Lookup Ident method
Lecture 14 Reading Numbers
Lecture 15 Extend Single Character Tokens
Lecture 16 Updating Next Token Method
Lecture 17 Extend the Keywords
Lecture 18 Extending Tokens with Double Character Tokens
Lecture 19 Creating a REPL
Lecture 20 Fix for issue in REPL
Section 3: Parsing
Lecture 21 Introduction to Parser
Lecture 22 Introduction to Parsing Let Statements
Lecture 23 AST for Statement and Expression Node
Lecture 24 AST for Let and Identifiers
Lecture 25 Starting with Parser Implementation
Lecture 26 Test case for Parsing Let Statements
Lecture 27 Explanation of Test case
Lecture 28 Implementation of parseStatement method
Lecture 29 Completing the parsing of let statement
Lecture 30 Adding errors to Parser
Lecture 31 Parsing Return Statements
Lecture 32 Introduction to Parsing Expressions
Lecture 33 Refactoring AST Module
Lecture 34 Add string method to root AST Node
Lecture 35 Infix and Prefix Methods
Lecture 36 Identifier Expression Test case
Lecture 37 Parsing Identifiers Implementation
Lecture 38 Parse Integer Literals
Lecture 39 Test case for Prefix Expression
Lecture 40 Implementation of Prefix Expression
Lecture 41 Test case for Infix Expression
Lecture 42 Implementation of Infix Expression
Lecture 43 Operator Precedence Test
Lecture 44 How Pratt Parser works
Lecture 45 Refactoring Tests
Lecture 46 AST and Test for Boolean Expressions
Lecture 47 Implementation of Boolean Expression
Lecture 48 Implementation of Grouped Expressions
Lecture 49 AST for If Expression
Lecture 50 Test case for If Else Expression
Lecture 51 Implementation of If Else Expression
Lecture 52 AST and Test case for Function Literal
Lecture 53 Implementation of Function Literal
Lecture 54 AST and Test case for Call Expression
Lecture 55 Implementation of Call Expression
Lecture 56 Working on Todo's
Lecture 57 Completion of Parser with update to REPL
Section 4: Evaluator
Lecture 58 Evaluation Introduction
Lecture 59 Object Representation
Lecture 60 Integer Representation
Lecture 61 Boolean and Null Representation
Lecture 62 Evaluation Implementation of Integer
Lecture 63 Evaluation Implementation of Boolean
Lecture 64 Null implementation
Lecture 65 Evaluation of Prefix Expression
Lecture 66 Evaluation of Infix (Integers)
Lecture 67 Evaluation of Infix (Integers) - Boolean Operators
Lecture 68 Evaluation of Infix (Boolean)
Lecture 69 Conditionals
Lecture 70 Return Statement
Lecture 71 Error Handling
Lecture 72 Let Statement
Lecture 73 Functions Pt.1
Lecture 74 Functions Pt.2
Lecture 75 End of Evaluation
Section 5: Adding Data Structures
Lecture 76 Introduction
Lecture 77 String Data Structure - Lexer
Lecture 78 String Data Structure - Parser
Lecture 79 String Data Structure - Evaluator
Lecture 80 String Data Structure - Concatenation
Lecture 81 Builtin Functions
Lecture 82 Builtin Function - len (string)
Lecture 83 Array - Lexer
Lecture 84 Array - Parsing
Lecture 85 Parsing Array Index Expressions
Lecture 86 Evaluate Array Literals
Lecture 87 Evaluate Array Index Expressions
Lecture 88 Array builtin Functions
Lecture 89 Hash Data Structure - Lexer
Lecture 90 Hash Data Structure - Parsing
Lecture 91 Hash Data Structure - Hash Key
Lecture 92 Hash Data Structure - Object Representation
Lecture 93 Hash Data Structure - Evaluation
Lecture 94 Hash Data Structure - Index Expression
Lecture 95 Builtin Method - Puts
Section 6: Conclusion
Lecture 96 Conclusion
Lecture 97 Bonus Lecture
Intermediate JavaScript / TypeScript developers