Search
Items tagged with: theWorkshop
I've been continuing work on ubal, and I'm trying to write the code in a way that helps maintain a connection to my mental model, as well as making better use of the conventions of lexing and parsing.
Ideally, I'll end up with a codebase that I (or someone else) can easily modify for use in other cultures with other time formats or numeral conventions. Even if it falls short of that, it's improving readability.
I'm fairly proud of the way I've written the lexing rules: directly in a state-machine specification. It's nested linked lists of blocks of code. You can see them here:
git.sr.ht/~fluffysoft/ubal/tre…
I've also written a method to print out all of the state transitions and the character codes on which they happen. You can find that on line 86. It makes use of nesting continuation loops, which I think makes it easier to read.
#uxntal #uxn #theWorkshop