- 138
- 420 297
Advanced Maths
Pakistan
เข้าร่วมเมื่อ 22 มี.ค. 2020
I hold a Ph.D. from the University of Freiburg, Germany, and have over ten years of teaching experience at a university. I have a passion for mathematics and theoretical computer science. My goal is to create comprehensive lecture videos for various courses.
While I may never reach a million subscribers and generate enough income to sustain myself through TH-cam advertisements, I sincerely appreciate your support. Hopefully, with your continued support, I can aspire to become a full-time content creator one day. If you'd like to make my day, consider supporting my channel:
patreon.com/advancedmath
www.buymeacoffee.com/drfaisalaslam
While I may never reach a million subscribers and generate enough income to sustain myself through TH-cam advertisements, I sincerely appreciate your support. Hopefully, with your continued support, I can aspire to become a full-time content creator one day. If you'd like to make my day, consider supporting my channel:
patreon.com/advancedmath
www.buymeacoffee.com/drfaisalaslam
Compilers: An Overview of Parsing Techniques -- LL(1), Recursive Descent, SLR, CLR, and LALR
In this video, we explore the basics of parsing, its purpose, and the different techniques used in compiler design. If you're new to the subject or just looking for a refresher, you're in the right place!
### **What You'll Learn:**
- What is parsing?
- The role of parsers in translating a program’s code into a parse or syntax tree.
- Differences between parse trees and syntax trees with examples.
- What happens when parsing fails?
- A high-level view of parsing algorithms.
### **Key Parsing Techniques Covered:**
#### 1. **Top-Down Parsing:**
- LL(1) Parsing
- Recursive Descent Parsing and its variations:
- Vanilla Recursive Descent
- Using FIRST and FOLLOW Sets
- With Backtracking
#### 2. **Bottom-Up Parsing:**
- LR Parsing Algorithms (LR(0) and LR(1))
- Parsing Schemes:
- **SLR (Simple LR Parsing)**
- **CLR (Canonical LR Parsing)**
- **LALR (Lookahead LR Parsing)**
### **Why This Video Matters:**
This video gives you a bird’s-eye view of parsing techniques without diving into complex details. It's a great starting point for beginners and a helpful recap for advanced learners. Plus, it sets the stage for our deep-dive videos on each parsing method, linked below!
### **Related Videos & Resources:**
- [Learn Recursive Descent Parsing with Code Walkthrough](th-cam.com/video/pP32ssBg1Yw/w-d-xo.html)
- [How to Create LL(1) Parsing Table?](th-cam.com/video/uFR1dgevYMk/w-d-xo.htmlsi=KQEHU5wooq8MSAvt)
- [Create a Parse Tree Using LL(1) Parsing Table](th-cam.com/video/3cVoQbFwGR8/w-d-xo.htmlsi=worcqX43V9Wcc0ay)
- [Example of LR(0) Automaton](th-cam.com/video/BxMFn7aelBk/w-d-xo.htmlsi=3Qo_pB-fXLEdvnL0)
- [Creating SLR(1) and LR(0) Parsing Tables](th-cam.com/video/YjEck_rmrQs/w-d-xo.htmlsi=Bqol0qFG9p6Kgmi5)
- [The Parsing Algorithm of LR Parsers](th-cam.com/video/zIQgky-hXJ4/w-d-xo.htmlsi=A3Hi6uEqfEPEodRP)
- [Example of Creating LR(1) Automaton and CLR Parsing Table](th-cam.com/video/sh_X56otRdU/w-d-xo.htmlsi=SQJ0qFtavGf40Yiv)
- [LookAhead LR (LALR) Parsing Table Creation](th-cam.com/video/d-8KAKXQ-Jw/w-d-xo.htmlsi=6NX_fc4JJpt2KURB)
### **Support This Channel:**
I would greatly appreciate it if you could treat me to a cup of coffee or show support for my channel through any other means. You can do so by visiting:
- [Patreon](patreon.com/advancedmath)
- [Buy Me a Coffee](www.buymeacoffee.com/drfaisalaslam)
### **What You'll Learn:**
- What is parsing?
- The role of parsers in translating a program’s code into a parse or syntax tree.
- Differences between parse trees and syntax trees with examples.
- What happens when parsing fails?
- A high-level view of parsing algorithms.
### **Key Parsing Techniques Covered:**
#### 1. **Top-Down Parsing:**
- LL(1) Parsing
- Recursive Descent Parsing and its variations:
- Vanilla Recursive Descent
- Using FIRST and FOLLOW Sets
- With Backtracking
#### 2. **Bottom-Up Parsing:**
- LR Parsing Algorithms (LR(0) and LR(1))
- Parsing Schemes:
- **SLR (Simple LR Parsing)**
- **CLR (Canonical LR Parsing)**
- **LALR (Lookahead LR Parsing)**
### **Why This Video Matters:**
This video gives you a bird’s-eye view of parsing techniques without diving into complex details. It's a great starting point for beginners and a helpful recap for advanced learners. Plus, it sets the stage for our deep-dive videos on each parsing method, linked below!
### **Related Videos & Resources:**
- [Learn Recursive Descent Parsing with Code Walkthrough](th-cam.com/video/pP32ssBg1Yw/w-d-xo.html)
- [How to Create LL(1) Parsing Table?](th-cam.com/video/uFR1dgevYMk/w-d-xo.htmlsi=KQEHU5wooq8MSAvt)
- [Create a Parse Tree Using LL(1) Parsing Table](th-cam.com/video/3cVoQbFwGR8/w-d-xo.htmlsi=worcqX43V9Wcc0ay)
- [Example of LR(0) Automaton](th-cam.com/video/BxMFn7aelBk/w-d-xo.htmlsi=3Qo_pB-fXLEdvnL0)
- [Creating SLR(1) and LR(0) Parsing Tables](th-cam.com/video/YjEck_rmrQs/w-d-xo.htmlsi=Bqol0qFG9p6Kgmi5)
- [The Parsing Algorithm of LR Parsers](th-cam.com/video/zIQgky-hXJ4/w-d-xo.htmlsi=A3Hi6uEqfEPEodRP)
- [Example of Creating LR(1) Automaton and CLR Parsing Table](th-cam.com/video/sh_X56otRdU/w-d-xo.htmlsi=SQJ0qFtavGf40Yiv)
- [LookAhead LR (LALR) Parsing Table Creation](th-cam.com/video/d-8KAKXQ-Jw/w-d-xo.htmlsi=6NX_fc4JJpt2KURB)
### **Support This Channel:**
I would greatly appreciate it if you could treat me to a cup of coffee or show support for my channel through any other means. You can do so by visiting:
- [Patreon](patreon.com/advancedmath)
- [Buy Me a Coffee](www.buymeacoffee.com/drfaisalaslam)
มุมมอง: 10
วีดีโอ
Quantum Computing: How to Construct a Quantum Fourier Transform (QFT) Circuit
มุมมอง 1K14 วันที่ผ่านมา
Welcome to the third video in our *Quantum Fourier Transform (QFT) Series*! In this detailed tutorial, we build the quantum circuit for the Fourier transform step-by-step. The QFT is foundational to many quantum algorithms, including Shor’s algorithm for factoring large numbers. In this video, you’ll learn: - The key notations and concepts essential for understanding QFT. - How to design the QF...
Quantum Computing: A Step-by-Step Example of Grover's Algorithm
มุมมอง 41314 วันที่ผ่านมา
In this third video of our series, we solve a complete example step-by-step, uncovering how Grover’s Algorithm efficiently searches for a specific input in a small database. Learn how to construct the quantum circuit, apply Hadamard gates, perform oracle and diffusion operations, and calculate the necessary Grover rotations. Watch as we break down each stage of the circuit, visualize the transf...
Compilers: Key Loop Optimization Techniques Explained with Examples
มุมมอง 12914 วันที่ผ่านมา
In this video, we describe loop optimizations in compiler design, focusing on five key techniques to enhance program efficiency and performance. With simple C examples, we explore how these optimizations work and how they can significantly improve code execution. The techniques explained include Loop unrolling, loop invariant code motion, loop fusion, loop fission, and loop unswitching. You can...
Compilers: Live Variable Analysis Explained Step-by-Step
มุมมอง 20921 วันที่ผ่านมา
In this video, we dive deep into *Live Variable Analysis*, a critical concept in compiler optimization. By the end, you will gain a complete understanding of live variables, how they are identified, and why they are important for optimizing programs. We'll explain step-by-step how to perform live variable analysis using GEN and KILL sets, compute IN and OUT sets for basic blocks, and finally us...
Compilers: Learn Recursive Descent Parsing with Code Walkthrough
มุมมอง 19621 วันที่ผ่านมา
In this video, we dive into Recursive Descent Parsing , a fundamental top-down parsing technique used in compiler construction. Learn how this method processes grammars, handles non-terminals, and works with LL(1) grammars using recursive functions. We also walk you through the implementation of recursive descent parsing with a step-by-step explanation of the code and an example grammar. You ca...
Compilers: Creating a Parse Tree Using LL(1) Parsing Table
มุมมอง 3292 หลายเดือนก่อน
In this video, we learn the construction of a parse tree and generating a leftmost derivation for a given input string using the LL(1) parsing table created in the previous video. We'll walk through the entire parsing process, breaking it down into easy-to-follow steps. Here’s what you’ll learn: - How to use an input buffer and stack to guide the parsing process. - The four main actions in LL(1...
Compilers: How to Create LL(1) Parsing Table? Step-by-Step Explanation
มุมมอง 3392 หลายเดือนก่อน
In this video, we explore the LL(1) parsing algorithm, a key method used in compiler design for syntax analysis. You’ll learn: - What LL(1) parsing means - The difference between top-down and bottom-up parsing - How to construct an LL(1) parsing table using FIRST and FOLLOW sets - How to handle both epsilon (empty) and non-epsilon productions If you’re new to FIRST and FOLLOW sets, make sure to...
Lattice Cryptography: What is a Fundamental Region and How to Compute It
มุมมอง 2583 หลายเดือนก่อน
In this video, we explore the essential concept of a fundamental region in lattice theory, a key building block for understanding both the geometric and algebraic properties of lattices. We begin by defining what a fundamental region is and why it matters, using simple examples to make the concept clear. From one-dimensional integer lattices to two-dimensional grids, we show how fundamental reg...
Compilers: Regular Expression To NFA Conversion
มุมมอง 1513 หลายเดือนก่อน
In this video, we explain the algorithm for converting a regular expression into a non-deterministic finite automaton (NFA). We demonstrate how to construct an NFA for the empty language, a singleton, the union and concatenation of two NFAs, and the Kleene star operation. Following this, we work through an example where we convert a regular expression to an NFA, explaining each step along the w...
Compilers: What is a Regular Language? Definitions, Explanation, and Examples
มุมมอง 1253 หลายเดือนก่อน
In this video, I define, and explain with examples: Alphabet, String, Formal language, and Regular language. Then, we do example of union, concatenation, and kleene star of different regular languages to produce new languages. #compiler #finiteautomata Support This Channel: I would greatly appreciate it if you could treat me to a cup of coffee or show support for my channel through any other me...
Compiler Construction: Creating Syntax Analyzer Using Bison
มุมมอง 2543 หลายเดือนก่อน
In this video we learn Bison while creating syntax analyzer for Simple Simple C. From defining grammar rules to managing ambiguities and generating parse trees, this video covers all aspects necessary for building a compiler;s syntax analyzer phase. While writing syntax directed translation, will learn about many Bison's powerful features and its many directives. Whether you're a beginner or an...
Lattice Cryptography: What Are Lattices? Definition, Explanation, and Examples.
มุมมอง 1203 หลายเดือนก่อน
In this video, we break down the fascinating concept of *lattices*. Lattices are mathematical structures that form a repeating pattern of points in space, and they play a crucial role in the future of secure communication. We’ll start by explaining what a lattice is using simple examples from both two-dimensional and three-dimensional spaces, like the honeycomb lattice and diamond lattice. We’l...
Data Structures: What is an Abstract Data Type (ADT)?
มุมมอง 1734 หลายเดือนก่อน
This video defines an Abstract Data Type (ADT), provides its key advantages, and give examples of key abstract data types. #datastructures #stack #queues Support This Channel: I would greatly appreciate it if you could treat me to a cup of coffee or show support for my channel through any other means. You can do so by visiting: - [Patreon](patreon.com/advancedmath) - [Buy Me a Coffee](www.buyme...
Compilers: Why Should You Learn About Compilers?
มุมมอง 4254 หลายเดือนก่อน
This is the first video in my compiler course, where I tackle common questions like "Why should I learn about compilers?", "Aren’t compilers a solved problem?", and "Are there really job opportunities for compiler engineers?" I share five key benefits of studying compilers and offer several motivating examples to help you see their value. I hope you enjoy the course! #compiler_design #compiler ...
Compilers: Finding FOLLOW Sets of a Context Free Grammar
มุมมอง 2584 หลายเดือนก่อน
Compilers: Finding FOLLOW Sets of a Context Free Grammar
Quantum Computing: What is Phase? Understanding Global and Relative Phases
มุมมอง 2.1K5 หลายเดือนก่อน
Quantum Computing: What is Phase? Understanding Global and Relative Phases
Quantum Computing: Bernstein-Vazirani Algorithm
มุมมอง 1.4K5 หลายเดือนก่อน
Quantum Computing: Bernstein-Vazirani Algorithm
Compiler Construction: Top 10 LLVM Classes and Their Uses: A Step-by-Step Example
มุมมอง 1677 หลายเดือนก่อน
Compiler Construction: Top 10 LLVM Classes and Their Uses: A Step-by-Step Example
Bison: Creating Syntax Analyzer of Simple Simple C
มุมมอง 3927 หลายเดือนก่อน
Bison: Creating Syntax Analyzer of Simple Simple C
Compiler Construction: Creating Complete Lexical Analyzer Using Flex
มุมมอง 6777 หลายเดือนก่อน
Compiler Construction: Creating Complete Lexical Analyzer Using Flex
Compiler Construction: What is LLVM? Benefits of Using LLVM for Compiler Creation
มุมมอง 2008 หลายเดือนก่อน
Compiler Construction: What is LLVM? Benefits of Using LLVM for Compiler Creation
Compilers: Example of Creating LR(1) Automaton & Canonical LR (CLR) Parsing Table
มุมมอง 1.6K9 หลายเดือนก่อน
Compilers: Example of Creating LR(1) Automaton & Canonical LR (CLR) Parsing Table
Compilers: Look-Ahead LR (LALR) Parsing Table Creation
มุมมอง 7129 หลายเดือนก่อน
Compilers: Look-Ahead LR (LALR) Parsing Table Creation
Compilers: Finding First Sets of a Context Free Grammar
มุมมอง 3749 หลายเดือนก่อน
Compilers: Finding First Sets of a Context Free Grammar
Quantum Computing: Fast Hadamard Gate Computing Using a Tabular Method
มุมมอง 1.8K9 หลายเดือนก่อน
Quantum Computing: Fast Hadamard Gate Computing Using a Tabular Method
Compilers: Creating SLR(1) and LR(0) Parsing Tables with Conflict Resolution
มุมมอง 1.3K9 หลายเดือนก่อน
Compilers: Creating SLR(1) and LR(0) Parsing Tables with Conflict Resolution
Compilers: The Parsing Algorithm of LR Parsers (SLR, CLR, and LALR) Explained
มุมมอง 8789 หลายเดือนก่อน
Compilers: The Parsing Algorithm of LR Parsers (SLR, CLR, and LALR) Explained
Example of LR(0) Automaton: Step-by-Step Explanation
มุมมอง 1.1K9 หลายเดือนก่อน
Example of LR(0) Automaton: Step-by-Step Explanation
Closure and GOTO Rules of LR(0) Automaton
มุมมอง 4119 หลายเดือนก่อน
Closure and GOTO Rules of LR(0) Automaton
Good one. Thanks from Pakistan :)
thank you sir
sir, thank you so much for these videos, these are golden
Thank you for your appreciation.
🙏🙏🙏
Please don't use colour chock it's not clearly visible
Noted.
Very well explained , thank you Sir !
Yahoo
Great video , deserves millions of views , keep it up sir
thank u sir
Sir we want to see you live on the blackboard again really appreciate the personal touch
1st Comment 👉🏻👈🏻👀
Clear and to the point 👌🙏
Starting this series to prepare for my exam. So far the best compiler theory on YT. Will see how it goes to the end of the series.
All the best for your exam!
@@AdvancedMath Thank you sir!
thanks :)
Sir, I do not understand how we can do the last optimization because the value of a is going to be different in both computations. Suppose at start a=2 and b=5 a=2+5=7 f=7+5=12 But if we change to f=a a=2+5=7 f=7 Do let me know if I am missing anything sir
16:32 Could you please clarify, that in the second iteration of live variable analysis, while computation of node 3 the OUT[B] should be IN[2], which will be the value from iteration 1 i.e., {i,j,k,p} instead of {p,i}?
you are correct. sir even wrote OUT [3] = IN [2] on the black board, might be a typo.
Yes that is a typo. Sorry about that. Good catch.
Thank you very much for this excellent explanation! It was clear and easy to follow. I have a small suggestion - it might be helpful to include the definitions of the closure function and the GOTO function for added clarity. Regardless, I truly appreciate the effort you put into this content. Thanks again!
Thanks for liking the video. There is a separate video about GOTO and Closure rules. th-cam.com/video/g1G7p9EPDYo/w-d-xo.htmlsi=-yMYasQ0Uvtpwuvy
thanks :)
3?
thanks sir :)
Sir, I had watched your qc Playlist for past 2 days and learnt a lot. I'm writing my comment today and tomm is my qc sem exam. Just a few days before, I had failed the qc formative assessment and my sir called me for a quiz so that I can pass it, unfortunately I couldn't answer even the basic questions. But, now, I seem confident, I have a love for qc now and it's all because of you. I never usually comment on yt videos but I commented here coz you have actually helped me a lot. I hope that I'll be able to pass tomm's exam and show my sir that I am also capable and let this be a reply to all the humiliation he gave me. I take it all in a positive note. Thank you once again.
Hey man, do you need to know "classical computing" in order to understand the lectures? And if you do, where can a learn it?
Knowing about classical computing will be helpful but not necessary. Linear algebra and probability are good to have.
Thank you @@AdvancedMath
ANLAT HOCAAA ELK336E vizesi var
GREAT EXLPANATION THANK YOU SO MUCH
Thank you! Great explanation
overall good method of teaching . Node tree ki samajh nahi ay just .....
Best explanation on the internet
Is it possible to communicate with you through mail Sir?
Sir, where is the y input at the Rf circuit at 5.49 in this video
i hate this video couldnt even understand a single line worstttttttt
how did eigen value become -i??? cos(2*pi)+i*sin(2*pi)=-1 right????
$\theta = 3/4$, thus $e^{2\pi i \theta}=e^{2\pi i 3/4}=-i$.
amazing! very well explained!!
Thank you.
The best video I've found to explain LR(1) items
Thanks, but the Pauli-Z gate in the thumbnail is flipped .. not the same as shown in the video I think
in my exam there was a question of deriving dirac notation of cnot gate ? how to do it ?
0:37 It is simple, but useless 🤣🤣
I have a doubt while decoding, how will bob know what bits to apply, still the probability of getting right answer remain 0.25
Thankyou sir 🙏
The best explanation of the Bernstein-Vazirani algorithm so far I have watched. Thank you Sir.🙏
You are welcome!
Nigbal
thanks :)
thanks :)
there's a mistakes, in last row, id terminal should be in the id column, instead of * column
Yes, That is a mistake.
Just to add i gusss alpha should be less than N for it to be in multiplicative group modulo 1
Excellent video
thank you so much sir. I am a very visual learner so I appreciate you drawing out all parts of the circuit/showing us what it looks like at all steps. If I ever win the Nobel Prize, I will be sure to cite you
Just want to tell you sir you are doing amazing job i want to learn about phase for so long but i cound not do it but your video helpd me very much keep doing this
Thank you for your appreciation.
Finally a video, where its intuitively clear what is happening, i love your clear understanding of the algorithm and also that you explain it flawlessly. You definitely have got a fan here!
Learning about compilers opens the world of underlying infrastructures of programming languages. Hence, it gives one the ability to deconstruct all the modern frameworks in a way that high-level developer can never do. I have always seen that those who evolve from low-level concepts to the high-level concepts are far better engineers than those who stick with the high-level concepts from the start.
Well said.