Save this video free

[HD] EECS4302 F26 - 2026-11-26 (Thursday) - Lecture 21

Jackie Wang · 1:05:58 · Watch on YouTube

Part of York University EECS3342/EECS4302. See all 36 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Jackie Wang explains how to prepare context-free grammars for top-down parsing: eliminate direct and indirect left recursion, remove epsilon productions while preserving the intended language, and use FIRST sets to reduce backtracking. A worked grammar orders Expression, Term, and Factor as variables 1, 2, and 3, then applies the algorithm’s two phases before calculating FIRST sets for arithmetic-expression productions.

Key takeaways

Chapters

0:00 Project Report Preparation and Milestone Two
1:30 Why Left Recursion Breaks Top-Down Parsing
3:00 Set Variable Order and Trace the Two-Phase Algorithm
8:00 Iteration One Removes Expression's Direct Left Recursion
16:00 Iteration Two Checks Indirect and Direct Recursion in Term
23:00 Iteration Three Checks Factor and Explains Ordering
29:50 Why Left-Recursion Removal Leads to Epsilon Elimination
34:00 Identify Nullable Variables and Enumerate Alternatives
40:00 Remove Epsilon Productions from an S, A, and B Grammar
47:00 How Lookahead Can Reduce Top-Down Parser Backtracking
53:00 Define FIRST Sets for Terminals and Variables
59:00 Calculate FIRST Sets for Arithmetic Grammar Variables
1:04:00 Propagate FIRST Through Nullable Prefixes

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:05 Okay. So uh your project report template has been on the e-class. Please take a look. I think uh uh maybe if you got any questions about it, either drop by my office hour or maybe when we got your project milestone meeting next Tuesday during the class, you can also ask me. I think we have time. Okay, we can definitely go over some sections. You definitely want to get prepared as soon as you can for about the project report. That's definitely something the TA has to rely on in order to evaluate your compiler in the final submission. Okay? And for project project milestone two, uh the guy was just released uh earlier this morning. So please take a look. Okay? The expectation will be just the same. So we're going to have some talk and also have some uh feedback given to you uh on the spot. The submission, the same. Please make

0:53 sure by Monday noon, make sure you submit so the TA can actually get prepared for Tuesday and Tuesday during the class. All right? The same. Okay? Nothing surprising. Okay? Question. >> project milestone once >> Yeah, I will try to post it uh maybe tomorrow, but I think since you guys were there, so maybe try to recall some details from there, but I'll definitely I got some limited notes as well on my side. I'll post them as well. Yeah. I think for milestone one, uh I think everybody got full marks. So that one you don't need to worry. Okay? It's not really meant to have any penalty on you. It's we just give you feedback. Okay? All right. So uh we're going to continue uh with removing the left recursion. Let's now again revisit about the big picture very

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

In this course

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Jackie Wang.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.