[antlr-interest] C++ & JAVA code in the same grammar file?

John Williams jr.williams at tiscali.co.uk
Sat Mar 25 11:17:28 PST 2006

The project I am working on requires the parser to be generated in JAVA and C++. 
What I would like to do is to use one grammar file and include my C++ and JAVA 
code in it. Is there any way that I can ask ANTLR to use the included JAVA code 
when I specify language="java" and the included C++ code when I specify 
language="Cpp"? It's a pity you can't tag the code with the language ie:

C++ { ...}
  or java { ...}

Thanks for any help.


More information about the antlr-interest mailing list