Premium Only Content
Compiler From Scratch: Phase 1 - Tokenizer Generator 018: Fixing errors at EndOfText, add more tests
Streamed on 2024-11-15 (https://www.twitch.tv/thediscouragerofhesitancy)
Zero Dependencies Programming!
The testing from last time revealed some bugs when the text buffer ends in certain ways. Today I debugged that issue and got all 120 tests to run. It related to how we were looking for the end of the text buffer and also how the LAZY tokenizer build differed from the BATCH tokenizer build.
Once that was done I tackled a couple of loose ends. The first loose end was to parse the TokenizerRule actions out of the string and into some Boolean flags. Eventually we will add more actions the tokenizer can take, and this makes that future work a little easier.
Lastly, there were a few places in the generated code that were logging errors. This is not good. The errors (and any warnings) should be saved in the Context. So I made that change. The only tricky bit here is the TxtBuf must be declared before the Context and can't reference it directly. Rather, the Context passes in a callback for when an error needs to be reported to it.
Then we added one more test case to be run each test execution, this time looking for "unexpected character" errors. It was a simple test to implement at the end of the day.
-
LIVE
B2ZGaming
6 hours agoPumped To Play!!! | B2Z Gaming
75 watching -
3:01:28
PandaSub2000
19 hours agoDEATH BET w/MrMatthews + GAME BOY! (Edited Replay)
22.5K2 -
LIVE
Ashaelon
8 hours ago $0.04 earnedWelcome to the Harvest Zone
88 watching -
18:07
Nikko Ortiz
1 day agoYou Laugh You Go To Hell...
96K21 -
23:24
GritsGG
16 hours agoSpectating Solos! Most Winning Player Watches Random Solo Players!
14.7K1 -
32:09
ThisIsDeLaCruz
2 days ago $9.85 earnedFalling In Reverse: Christian Thompson’s Stage Tech Revealed
65.8K13 -
18:03
Nikko Ortiz
2 days agoEBT Meltdowns Are Insane...
67K150 -
2:02:46
Badlands Media
1 day agoDevolution Power Hour Ep. 405: Live from Cocoa Beach
211K78 -
1:33:56
Man in America
14 hours agoElon Says the Quiet Part Out Loud: AI Will RULE Humans, No More Money, BILLIONS of Robots
69.5K74 -
51:25
The Connect: With Johnny Mitchell
15 hours ago $35.51 earnedInside The REAL Narco State: The Colombian Drug Cartels DOMINATING The Global Cocaine Trade
44.2K22