There are deterministic finite state machines underneath implemented in lean C++. These automata allow to implement operations with strings optimally or close to that. In the readme file there is a link to how to recompile linguistic resources, if you look inside the makefile that is used for resource compilation you will the steps.
Do you use any kind of library or typical design pattern for your FSM implementation? When I've used them, I typically always go back to very C-like code (enum for the states, a state variable, and a big switch statement inside a loop).
We don't represent automata as a code, that leads to compiler errors etc., we represent them as graphs, just as data.
Inside the code we use:
state --> int
set of states --> sorted / unique'd array of int's
input symbol --> int
output symbol --> int
transition function is abstracted out behind an interface and implemented differently based on whether automaton is read-only or changeable and based on the state etc.
I'm going to have to think about that a bit. Maybe I'm missing the point, but it sounds like an interpreter. Thanks for posting the code. This feels like something I need to understand.