
this video will show your the final result of this chapter, you can get the project running and get the first hand feeling for what is lexing
We introduce the concept about what is lexing
we lay down the framework for our lexing project, we will add modules or functionalities base on this framework.
In this video we add a Scanner component to our project and preparing test framework for later TDD.
in this video we add some test cases for our lexer, make sure those cases fail at first then we add code to make those test cases passed
In this video, we will add code to complete the scanning for one character operator
In this video, we enhance our scanner to handle operator with two characters
In this video, we add Scanning for comment operator
In this video, we remove the impact of space and count the line number in the process of scanning
In this video, we will add code to handle literal string , which is quite troublesome
In this video, we add code to turn number literal into number token
In this video, we will turn string like "my_variable" into identifier
In this video, we will try to lexing several tokens in one line
In this video, we create a terminal emulator to run lexing command and see its result
In this video, we give a brief introduction to parsing, bring in its concepts and lay the foundation for code implementation at later videos
In this video, we use code to implement the arithmetic expression parser, by coding you can gain more inside of parsing algorithm
In this video, we debugging the arithmetic expression parser code, by doing this we can have a better understanding for the logic of parser
In this video we will solve problems left by last video, by solving those problems, you will gain a deeper understanding for parsing algorithm
In this video, we will introduce a very important data structure called abstract syntax tree, and showing you what the tree looks like
In this video, we will add code to show how can we implement the syntax tree, this vide will only show the algorithm logic for the tree.
In this video, we will using d3 tree component to help the rendering of syntax tree, code in this video is related to react js UI, if you are not familiar with it, you can just type in the code, make sure get the same result, don't spend too much time for understanding it
In this video, we give introduction to recursive descent parsing, we talk about what are recursive and descent, and then give a more complex grammar or rules for parsing weird but legal expression like 1 + + + -2
In this video, we lay down the framework for recursive descent parser and add a test case for parser to satisfy
In this video, we add two token handling methods on the parser and make sure all test cases can be passed
In this video, we create the first test case for the parser and begin adding code to satisfy the test case
In this video we turn all grammar rules into related function calls, which is a tedious work
In this video, we add more code to related parser functions and make sure the first test case for the parser can be passed
In this video, we add code to parser make it enable to parse expression with + and -
Add handling unary operator
in this video, we add code to parser and make it can parse expression with operator multiply and division and expression with brackets
In this video, we add support for operator *, / and () in expression
In this video, we add support for comparison operator like >, >=, <, <= and equality operator like ==, !=
In this video, we draw the parsing tree created by the parser in last section and show its problem, then we give a solution by using visitor pattern
In this video, we show how to use visitor pattern to create a parsing tree visitor, and change the parsing tree structure without give too much change to the parser
In this video, we complete the parsing tree structure adjust visitor and show our visitor pattern can effectively and clearly readjust the structure of parsing tree
In this video, we add code to evaluate expression with parentheses
In this video, we add code to evaluate unary expression like -1.23, !true
In this video, we set the truthiness and falseness rule on our language
In this video, we show how to use code to do evaluation for operator + and -
In this video, we use code to implement the evaluation for binary operator * and /
In this video, we show how to use code to implement the evaluation on comparison operators like >, >=, <,<=
In this video, we show how to use code to implement the evaluation of equality operator like ==, !=
In this video, we add support for * and + with string and number
In this video, we show how to report error when we do arithmetic operation on incompatible types
In this video, we show how to fix a bug related to parsing tree structure adjusment
In this video, we show how to use code to implement the parsing and evaluating of print statement
In this video, we show how to create runtime object to enable the evaluation of multiple lines of code
In this video, we show the code implementation for parsing of variable declaration
In this video, we implement the binding of variable with its assigned value
In this video, we introduce the grammar rules for parsing variable assignment
In this video, we use code to implement variable assignment
In this video, we make sure can only l-value like object can receive assignment
In this video, we show how to evaluate assignment statement
In this video, we add code to enable the parser to parse block statement
In this video, we add code to enable variables the declared by keyword let to bind with local environment
In this video, we add more test cases to show the logic of variables binding with local scope
In this video, we introduce the grammar rules for parsing if else statement
In this video, we show how to implement the parsing for if else statement
In this video, we introduce the grammar rule for parsing logic operators
In this video, we add code to do the evaluation of if else statement
In this video, we give code for logic operator parsing
In this video, we add code to evaluate two logic operators
In this video, we show how to use code to parse the while loop
In this video, we use code to implement the evaluation of while loop
In this video, we give grammar rules for the for loop and show how to parse it
In this video, we introduce break and continue statement for breaking loop
In this video, we show how to use code to evaluate the for loop
In this video, we introduce the grammar rule used for parsing function call
In this video, we show how to use code to implement grammar rule for parsing function call
In this video, we debug the function parsing call process to let you gain more understanding for the code logic
In this video, we give grammar rules for parsing function declaration
In this video, we give detail code implementation of the grammar rule for parsing function declaration
In this video, we go through the function declaration parsing code line by line by debugging
In this video, we add code implementation to evaluate function call
In this video, we debugging the function call evaluation process and help you gain better understanding
In this video, we show some error cases related to function call and give handling methods
In this video, we give grammar rules for how to parsing return statement in function
In this video, we give code implementation for evaluating return statement
In this video, we show how to make sure return statement can only appear in function body
In this video, we give code details about how to parsing and evaluating unnamed function and support function assignment
In this video, we debugging the unnamed function evaluation process and help you gain better understanding
In this video, we introduce the problem for variable binding and give the solution
In this video, we design a resolver for doing variable resolution and give its complete code implementation
In this video, we show how to combine resolver with interpreter and runtime to query variable value from the correct environment object
In this video, we show the resolver code logic by debugging the code line by line and help you gain deeper understanding for the code logic of resolver
in this video, we show how to enable parser to parse code related to class declaration
In this video, we show how to initialize a class instance by code implementation
In this video, we give the grammar rule for reading and setting instance fieles
in this video , we show how to use code to parse field accessing of class instance
In this video, we show how to use code to implement field accessing of given instance
In this video, we show how to make an independent parsing tree for class definition
In this video, we show code implementation for assign and get value for fields of instance
in this video, we show how to enable parser to parse field accessing combine with method calls
in this video, we show how to access and assign value to field of instance
In this video, we show how to use code to implement this keyword and method call on given class instance
In this video, we show how to use code to implement this keyword and method call on given class instance
In this video, we show how to add class constructor function to class definition
In this video, we show how to use code to run class instructor when class instance is initialized.
in this video, we give some error handling for class definition to wrap up this section
Welcome to the exciting world of interpreter and compiler technology! Are you ready to take your coding skills to the next level? Look no further, because our new course on Udemy has everything you need to dive deep into the fascinating realm of programming language development.
In this course, we'll guide you through the creation of your very own interpreter or compiler for a self-defined programming language called DragonScript. But why should you embark on this journey? Let's break it down:
Enhance Your Coding Skills: Learning interpreter or compiler technology isn't just cool—it's essential for any programmer looking to level up their skills. Understanding how languages are interpreted or compiled opens doors to deeper insights into programming concepts and boosts your problem-solving abilities.
JS and React JS Power: Why JS and React JS? Because they're not just for building web applications! These powerful tools are perfect for developing interpreters or compilers due to their versatility, ease of use, and extensive community support.
Interactive and Engaging: Get ready for an interactive and exciting learning experience! Our course is designed to keep you engaged from start to finish with hands-on projects, quizzes, and real-world examples.
Step-by-Step and TDD Approach: We take a methodical approach to learning, guiding you through each concept step by step. With a focus on Test-Driven Development (TDD), you'll build your skills in a structured and easy-to-follow manner.
Emphasis on Coding: Get ready to roll up your sleeves and dive into coding! This course isn't just about theory—we believe in learning by doing. You'll spend plenty of time writing code, building projects, and honing your skills through practical exercises.
Demystifying Compiler Algorithms: Compiler algorithms can seem daunting, but fear not! We'll break down these complex concepts into digestible chunks with plenty of concrete coding examples. By the end of the course, you'll wonder why you ever found them intimidating.
Explore key concepts like lexical analysis and grammar parsing, laying the foundation for your journey into language development.
Take your skills to the next level with advanced topics such as closures, first-class functions, error handling, and class inheritance. Become a coding maestro in no time!
Whether you're a seasoned developer looking to expand your knowledge or a newcomer eager to learn, our course has something for everyone. Join us on this exciting journey and unlock the secrets of interpreter and compiler technology. Enroll now and start building your own programming language today!