Coding 2022-01-10

By Max Woerner Chase

The linux side of things works a little better now. In this context, "a little better" somehow means "my laptop now has an input mode that has Cyrillic letters and fullwidth spaces".

But anyway. We handled some stuff today that took up part of the afternoon, and now I want to see if I can get a handle on taking the recognizer and getting it to produce parse trees.

Let's see how that looks.

My initial thought is to have it work like "given an index that defaults to -1, generate all valid trees that end at that index". (I'm using Python indexing, so that's how that means what I want it to.) First some context: instead of storing an index for the dot in the items, I'm storing a tuple of Optional[Token]s, which I'm calling nodes. The Forest objects that I'm writing this for store a reference to the type of the topmost node, so things start out as follows:

I think this is about what the tutorial was saying, and I've tried to reword it for my own comprehension, but I'm not sure the result is helpful for anyone else. It's basically notes, a little less refined than a rough draft. If anyone is following along with this and trying to understand this for themselves, I would highly recommend taking your own notes along these lines, in whatever way and format makes the most sense to you. Not least because I haven't yet vetted this stuff, so there's a chance some aspect of it is simply wrong.

Anyway, I should get this published and get to bed ASAP.

Good night.