I need to implement two tools for a single DSL: UI editor in Java and interpreter in C/C++. My first idea was to use ANTLR, since it can generate parsers for both Java and C/C++. But all ANTLR examples that I've seen contains some language-specific code or settings.
Is there any way to generate two parsers for a single DSL?
Does this even make sense to generate two parsers from a single grammar?
Is there any commonly used approaches for this problem?