Coding 2023-07-13

By Max Woerner Chase

I still haven't got a handle on the new schedule stuff (honestly, I'd like to figure out some way to just be exempted from it, because I don't see what the point is). Anyway, I'm going to try to take some quick notes on Earley parser stuff and have that be my post.

So. My attempt at a Python implementation has a few moving parts. One of these is called add_item. It supposes that if an item is already in an Earley set, then the next action for it must be queued up, and it accomplishes this by first checking, then queueing, then adding. The queues are represented by a set[Item] (for completion) and two dict[Item, Symbol]. An Item is a combination of a Rule and an integer index, which could be obnoxious if I translate it directly, because I think that means a bunch more modules. The different queues are pulled from using different functions that don't return a value, they just mutate the queues. Now, a close port of the Python logic would actually not be The Worst, because the queues don't leak anywhere, but I would like to see if it's possible to avoid using mutation.

I think the missing piece in understanding how to update this is just to take some notes, because reading the ipynb file in vim is... probably not the best way to get a handle on this. Anyway, I will regret it so much if I don't get ready for tomorrow, so I've got to be done now.

Good night.