Syntax highlighting with ANTLR grammar

Hello, I have a parser that is automatically generated from an ANTLR 4 grammar file. To use it with CodeMirror for syntax highlighting, would I have to rewrite the grammar to a Lezer grammar file?

Or is there a simpler way to provide basic highlighting (e.g. just highlight comments and keywords) using something simpler than either option?

Thank you

Correct. We don’t have a way to generate error-tolerant, incremental parsers with ANTLR.

You could write a very simple Lezer grammar, that just recognizes tokens and possibly matched brackets.