Impressive! The grammar.json file is just a little bit too underspecced to automate some things. Not to mention it's self-referential. How did you deal with extras and other 'specialisms' that are secretly hidden away in the C-level scanner and so on?
I ask because I wrote Combobulate [1], a structured editing and movement tool for Emacs using TS.