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

Prashant Deva prashant.deva at gmail.com
Sat Mar 25 12:46:21 PST 2006

1 grammar file can generate code in only 1 target language. You need 2
different grammar files to gen code in 2 diff languages.

Prashant Deva
Creator, ANTLR Studio
Founder, Placid Systems, www.placidsystems.com

On 3/26/06, John Williams <jr.williams at tiscali.co.uk> wrote:
> 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
> 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.
> John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060326/bbcd2d11/attachment.html

More information about the antlr-interest mailing list