I jusy used this recently for making Traindown syntax highlighting! It was pretty intuitive, even though I haven't done this kind of thing before!
https://github.com/inro-digital/lang-traindown
I did notice that it seems (rightfully) very focused on the exact usecase of syntax highlighting. Do people also use this kind of system for quickly building ways to parse data from arbitrary text syntaxes?