Premium Only Content
Compiler From Scratch: Phase 1 - Tokenizer Generator 021: Using tokenizer in the tokenizer generator
Streamed on 2024-12-06 (https://www.twitch.tv/thediscouragerofhesitancy)
Zero Dependencies Programming!
The tokenizer generator has to parse two files (so far): the project file and the tokenizer definition file. If we can generate a tokenizer, why not use that to parse those files? There's no reason not to so I started that task today. There is a bit of back and forth as you update your file parsing and the supported tokens and keeping them in sync enough to continue to build and run while making the switch.
Things were going reasonably smoothly until I ran into a bug. I thought it was a bug that I had been anticipating for quite a while, but it turned out to be something else. I anticipated it being an ordering problem, but instead it looks like our DFA isn't quite formed correctly. There are states that should be merged, like if two keywords start with the same letter. Also, there are states that should have reasonable fallbacks if they don't complete (or if they continue after the expected end) as in the case of a KEYWORD being a subset of an identifier. If the KEYWORD doesn't match exactly, it can and should still skip over into the identifier track. But that isn't happening right now.
I started looking into this bug, but didn't have time to finish it. Today's stream was a bit short and the code of interest is stuff I haven't looked at in quite a long time, so there was quite a bit of time spent trying to remember how it works and reason about what the fix should be. We'll finish debugging this next week.
-
3:58:54
SavageJayGatsby
7 hours ago🎃 Friend Friday – Halloween Edition! 👻🕷️
23.4K1 -
16:16
Robbi On The Record
12 days ago $17.72 earnedThe Dark History of Halloween | What You Should Know
56.5K46 -
58:18
Flyover Conservatives
1 day agoThe Truth About Halloween that You DIDN’T Know - Holiday Special - Historian Bill Federer | FOC SPECIAL Show
38.4K3 -
3:10:46
Ellie_roe
5 hours agoEllie and Errys Halloween Spooktacular || Random Horror Games
16.2K -
50:27
Sarah Westall
7 hours agoBig Banks Caught Rigging Market, IMF tells World to “Buckle Up” w/ Andy Schectman
32.2K10 -
13:54
Degenerate Jay
14 hours ago $1.15 earned5 Best Superhero Movies To Watch On Halloween
15.6K4 -
59:03
NAG Podcast
7 hours agoSarah Fields: BOLDTALK W/Angela Belcamino
25.5K7 -
1:21:41
Glenn Greenwald
9 hours agoGlenn Takes Your Questions: On the Argentina Bailout, Money in Politics, and More; Plus: Journalist Jasper Nathaniel on Brutality and Settler Attacks in the West Bank | SYSTEM UPDATE #541
82.8K41 -
3:10:08
Barry Cunningham
7 hours agoPRESIDENT TRUMP TO USE NUCLEAR OPTION? FOOD STAMPS END! | SHUTDOWN DAY 31
49.4K34 -
1:06:56
BonginoReport
14 hours agoThe Battle Between Good & Evil w/ Demonologist Rick Hansen - Hayley Caronia (Ep.168)
100K38