[antlr-interest] antlr2-C++ target patching?!

Jim Idle jimi at temporal-wave.com
Sun Feb 19 13:47:02 PST 2012


You should not be using C++ inside the actions. Create a helper class, and
call from it. The headers are extern "C" and then compiler the generated C
as C++ and you are fine. I doubt that anyone will be patching 2.7.7 C++
target.

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Oliver Kowalke
> Sent: Sunday, February 19, 2012 5:31 AM
> To: antlr-interest Interest
> Subject: [antlr-interest] antlr2-C++ target patching?!
>
> Hi,
> I'm forced to use antlrv2 because antlr3 does not support C++!
> The C target encloses the generated lexer/parser code in 'extern "C"'
> which prevents using C++ constructs (like templates or constructs from
> other C++ libs) inside the parser.
>
> I found that the last version of antlr2 (2.7.7) requires a patch
> because of missing headers.
> Where do I have to post this patch?
>
> regards,
> Oliver
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address


More information about the antlr-interest mailing list