User Interface Parsing

I wrote a derivative based parser in python today. The parsing algorithm got interesting qualities. It operates on arbitrary CFGs, and it can produce ambiguous parses. It is tricky to implement but otherwise very straightforward algorithm, for simple grammars and inputs it can be done by hand on a paper.

This week I'm planning to produce an earley parser variant which constructs its parse trees attempting to return the most expected result first. It'll be one of the last pieces I'm putting down to the textended-editor.

Otherwise I'm going to loosen the grip on textended a bit. There are things I need to do, if just for not numbing my skills. Next weeks blog post probably won't discuss textended. They're probably more on graphics programming/steamos/vulkan direction.

I will 'finish' textended just enough, that it'll be usable although slow for something in its current form. I suspect it won't be good enough for programming though. I didn't conclude anything about structure programming so in that aspect the project's a failure. In other hand I got some experience about implementing editors.

It's looking like people will eventually have less need for parsing. HTTP/2 and SPIR-V are both binary protocols. I consider it an upcoming trend in computing that we rather use binary protocols because they're easier to implement than LR(1) constrained plaintext parsers.

If you're accepting input from the user then you'll need parsing. Preferably interactive parsing. Ambiguity won't be bad like it's in protocols or programming languages so algorithms only operating on unambiguous grammars aren't as useful. And the individual inputs are short. It favors for parsing algorithms that can work on ambiguous grammars, such as the derivative parsers, CYK, GLR, earley.

Similar posts