Premium Only Content

Compiler From Scratch: Phase 1 - Tokenizer Generator 013: Line tracking TxtBuf, fixing ANY in regex
Streamed on 2024-10-11 (https://www.twitch.tv/thediscouragerofhesitancy)
Zero Dependencies Programming!
Last week I fixed the newline issue on the regex side, but the TxtBuf wasn't tracking the lines correctly at the end of that session; So that's what I started with today. It needed to trim the trailing whitespace, there was an off-by-one error with that, there was some special handling around the last line of the file and a small update to handle empty lines. With that working, the line tracking works great and we can now print out lines of text and underline the token in that context.
After that it was back to tackling the string regex. I was mostly sure that it had to do with the regex ANY operator. But as I was working through that issue, I was depressed by how bad the outputs were that I had to look at ... inconsistent, incomplete, and difficult to escape when embedding the text. So I backed up to an old TechDebt item on the TODO list and went to town on it. It took a bit of doing, but the output on the console and in the NFA/DFA graphs are now consistent and much more readable with proper escaping.
With better output to look at it was time to dig into the string regex. I identified the issue with the empty exclusion (ANY regex operator ".") and had to patch around that a bit in a few places. Ultimately it wasn't too bad to get the NFA and DFA generating correctly. The code generation doesn't work with these updates yet, but that is a problem to be solved next week.
-
LIVE
TimcastIRL
2 hours agoNew DOCS PROVE Obama Hillary CONSPIRACY To SABOTAGE Trump Admin | Timcast IRL
25,319 watching -
LIVE
Laura Loomer
2 hours agoEP136: YOU'RE FIRED! White House Vetting Crisis Continues
657 watching -
LIVE
SpartakusLIVE
3 hours agoDuos w/ @GloryJean || #1 Masculine Muscle MASS sears YOUR retinas with MIND BENDING content
446 watching -
8:07
MattMorseTV
2 hours ago $0.13 earnedTrump just LOWERED PRICES by 75 PERCENT.
4318 -
LIVE
Misfit Electronic Gaming
5 hours ago"LIVE" "Blind Descent' +"Dollhouse of Dead" Playtest 10 Followers till we hit 1000! We CAN do this!
25 watching -
21:53
Glenn Greenwald
4 hours agoMichael Tracey on the Street: What Do People Think of the Epstein Case?
82.6K50 -
LIVE
megimu32
1 hour agoOTS: Board Games Gone Wild! The Loud, Weird & Chaotic Games That Raised Us
135 watching -
LIVE
DamnDanieI
2 hours agoKill First, Loot Later – OTG Live
241 watching -
56:41
Donald Trump Jr.
6 hours agoLies, Leaks, and Lawfare: Censorship Corruption Exposed | TRIGGERED Ep.263
112K103 -
LIVE
Precision Rifle Network
3 hours agoS4E25 Guns & Grub - Rex Is Back, I shot the 6.5PRC finally...
32 watching