Transform a JSON grammar into a syntax-highlight parser for CodeMirror