I'm developing an ANTLR grammar to fill in some gaps in text. It's like that:
<% SOME_STATEMENT_TO_BE_REPLACED >
My problem is, that I have to target multiple languages with ANTLR3's (4 is possible) codegen. The statement I have to replace is actually a Query for some business logic (there's existing code, I just replace a parser).
I wonder whether I can make use of some features of ANTLR that switch to language templates like:
options {
language=CSharp3;
output=AST;
ASTLabelType=CommonTree;
}
Is there some meta-syntax which I can use across C#, Java and C++?