I got a bit of work done on the port/rewrite: the code to represent and reverse a raw environment is in, as is most of the code required to convert a raw environment to a matcher automaton.
What's missing from that is the code to handle categories, which is complicated somewhat by the fact that it's also the code to handle word boundaries. What's missing from the rest is the metathesis code, still, and some wiring-together logic that should be trivial.
I've been having kind of a rough week in general, but I think I'm making some minor breakthroughs in productivity, which is a nice bone to be thrown after over a month.
Anyway, I'm done for the night, so I'm wrapping up.