Guess I am not quite following this - would not using the @header section solve 
this? All headers should protect themselves against multiple #include of course.

I can add an  @preinclude easily enough but I don't want to clutter the options 
unless I must of course. @header is inserted before the #include of the 
generated header file.

Also, I am not sure that you really need to do this. You should place any code 
using C++ templates and headers etc in external files and create an API that 
you call from action code. That API should have a header and I can't see that 
including that header after <NAME>.h should be a problem. That doesn't mean 
that there isn't one, just that I am not seeing why. Can you post an example to 
the list? If @header won't do it and there is a valid reason, then I will 
certainly add another @option to fix it.

Jim

> -----Original Message-----
> From: [email protected] [mailto:antlr-interest-
> [email protected]] On Behalf Of Gokulakannan Somasundaram
> Sent: Wednesday, January 06, 2010 8:14 AM
> To: [email protected]
> Subject: [antlr-interest] Request for preinclude_c option
> 
> Hi Jim,
>        One more request that would help people, who would develop
> parsers
> for C++. As you might know, there is a requirement to include C++
> Headers(atleast the ones with templates) before the C Headers, in order
> to
> avoid lot of cumbersome errors. Currently we have the following options
> a) to include something before the antlr headers in .h file (preinclude
> b) to include something after the antlr headers in .h file
> c) to include something after the headers in the .cpp file
> 
> So the fourth permutation might help people who develop with C++ and
> not
> make the headers heavy.
> 
> Thanks,
> Gokul.
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address




List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.


Reply via email to