Compiler From Scratch: Phase 1 - Tokenizer Generator 003: Stealing code from my old sandbox

2 months ago
4

Streamed on 2024-08-02 (https://www.twitch.tv/thediscouragerofhesitancy)

Zero Dependencies Programming!

As a warmup I updated the output of the tokenizer rules into a nicely formatted table.

With that out of the way, it was time to start stealing. I have worked through various iterations of different pieces of these concepts before and began stealing from those old code folders.

We now have a way to walk through a buffer as UTF8 correctly and spot most common errors (except range checking). Then we copied a character collection I call "ClusionSet" from my old code and mostly copied NFA/NFAState from the same old code. There will be some changes, but most of the ideas from before are solid, so I'll save myself from re-inventing the wheel that I already re-invented once.

Loading comments...