Kat script PEG parser
Reading a blog post by Guido van Rossum was like reading a list of all the problems we had with the parser in the past year. Python up until 3.9 used a parser similar to our LALR(1) parser build using the SLY library, and had to have many hacks to work with some of the more nuanced Python syntax. The replacement in 3.9 is a PEG parser, which has no limits on the number of tokens looked ahead to determine which parser rules to apply, which is one of the main problems we faced and one which requires a tokeniser normalisation hack to make work.
In his blog series, van Rossum presents a Python-based PEG parser-generator and demonstrates it with a Python-like language. It would be nice to one day attempt to use this for kat script. It should even be pretty easy to generate Cython code using the parser-generator, potentially giving a nice speed-up. It's a low priority, but one that might become a higher priority if we encounter any more issues with our grammar and LALR(1).