Premium Only Content

Compiler From Scratch: Phase 1 - Tokenizer Generator 010: Dispatching DFAStates with switch/case
Streamed on 2024-09-20 (https://www.twitch.tv/thediscouragerofhesitancy)
Zero Dependencies Programming!
Work on the Tokenizer Generator continues. I plan to implement it with several different processing options so we can compare the performance implications, which leads to the permutations of code to generate a bit unwieldy. There are 96 permutations for the Tokenizer Generator right now. To narrow the scope for the days work we settled on the following three options to get the process working end-to-end in one way. I set the defines in my Makefile for using a C++ style iterator to get each character, to process all the tokens in a single batch, and to dispatch DFAStates with a switch/case statement.
With that scope set for the day I got to work. It didn't take long to dispatch the DFAStates, and there was a bit of work to initialize the tokenization process correctly. Instead of generating the tokens when accepting a token, I just logged the information the tokens would need. This worked pretty well and showed that the flow was working as expected.
Then it was time to actually generate the tokens themselves. I decided to just put the list of Tokens in the Context and not keep them in the Tokenizer. This shouldn't have been too hard, but we ended the day with a crash that I wasn't able to pin down before the end of the stream. The debugger was useless as it wasn't breaking on the lines specified and wouldn't do anything with the stackdump. I am sorely tempted to debug it this weekend off-stream. We'll see.
-
LIVE
Grant Cardone
4 hours agoGrant Cardone LIVE: The 10X Truth That Made My First $1 Million In Real Estate
689 watching -
LIVE
putther
37 minutes ago⭐ Bounty Hunting on GTA⭐
178 watching -
LIVE
Total Horse Channel
23 hours agoAMHA 2025 9/20
859 watching -
1:53:15
I_Came_With_Fire_Podcast
12 hours agoThe Satanic Cults Convincing Kids to Commit Violence
27.6K10 -
1:02:13
X22 Report
5 hours agoMr & Mrs X - [DS] Created Antifa To Push An Insurgency In This Country - Ep 8
129K45 -
1:13:24
Wendy Bell Radio
9 hours agoPet Talk With The Pet Doc
34.2K39 -
1:19:30
Game On!
1 day ago $10.43 earnedCollege Football Week 4 Betting Preview!
141K4 -
26:04
Artur Stone Garage
4 days ago $2.05 earned$500 Civic: Will It EVER Drive Without Breaking Down?
27.5K7 -
31:44
SouthernbelleReacts
2 days ago $3.48 earned“E.T. Phone Home! 🛸 Emotional Mom Style Reaction to E.T. the Extra-Terrestrial (1982)”
44.4K6 -
20:10
JohnXSantos
1 day ago $1.21 earnedI Built a FAKE Luxury Brand With $100 In 7 Days
34.6K2