Compiler From Scratch: Phase 1 - Tokenizer Generator 006B: Starting code generation
The Discourager of Hesitancy The Discourager of Hesitancy
170 subscribers
9 views
0

 Published On Aug 23, 2024

Streamed on 2024-08-23 (  / thediscouragerofhesitancy  )

Zero Dependencies Programming!

Interrupted stream today. My UPS started popping, so I terminated rather abruptly to troubleshoot that before everything went down. We were back online in minutes. There is a part A.

With a complete path from ConfigFile to DFA, it is time to start generating code. I wrote a helper class to handle the file and structured output in a nice way, then went to town. Our structure will be a single hpp/cpp pair of files outputted. They are namespaced. There will be some things in the cpp file that are not in the hpp file, as the hpp file is the "publicly facing" portions of the code. Today I made it through adding TextBuffer (to load/hold text for our tokenizer) to the cpp file. This is not a "publicly facing" thing, but we can hack around it to get it tested.

In the end we had a few minutes so I added different logging levels to our command line options. There wasn't really a task the right size to start, so I am off to grill some steak.

show more

Share/Embed