[antlr-interest] Request for preinclude_c option
jimi at temporal-wave.com
Wed Jan 6 09:22:15 PST 2010
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.
> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Gokulakannan Somasundaram
> Sent: Wednesday, January 06, 2010 8:14 AM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] Request for preinclude_c option
> Hi Jim,
> One more request that would help people, who would develop
> 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
> 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
> make the headers heavy.
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
More information about the antlr-interest