I have a fairly simple custom DSL created in antlr4. I'm trying to find the easiest way to use it in a web based monaco-editor with all the bells and whistles.
I see you can create monarch definitions from scratch using: https://microsoft.github.io/monaco-editor/monarch.html (The problem with that is for future changes I'd have to keep 2 things up to date, the antlr grammar and the monarch json definition. Also, since they are separate implementations, how could I be certain they both match/agree).
I also see you can manually use an ANTLR generated lexer/parser to do everything yourself with just ANTLR: https://tomassetti.me/writing-a-browser-based-editor-using-monaco-and-antlr/ (Compared to monarch, this seems like a LOT of manual work, and I'm having trouble finding many examples of this or much documentation).
Is there an easy way to just generate the monarch json definition from the antlr files? If no, which of the first 2 options is generally preferred and why?