[antlr-interest] [C target] mutiple inclusion of header files generated by the parser fails
Jim Idle
jimi at temporal-wave.com
Wed Jun 11 13:40:15 PDT 2008
On Wed, 2008-06-11 at 16:23 -0400, Florent Teichteil wrote:
> Multiple inclusion of header files generated by the parser creates
> compilation errors due to an inversion in the order of #endif pragmas.
>
> At the end of 'langLexer.h' and 'langParser.h', the following lines:
>
>
> #endif
>
> #ifdef __cplusplus
> }
> #endif
>
> /* END - Note:Keep extra line feed to satisfy UNIX systems */
>
>
> should be replaced by:
>
>
> #ifdef __cplusplus
> }
> #endif
>
> #endif
>
> /* END - Note:Keep extra line feed to satisfy UNIX systems */
>
>
> Otherwise, the C++ compiler complains with the bracket '}'. The error
> is obvious because the #ifdef pragmas are defined in the inverse oder
> at the beginning of these two files.
Cheers, i wil lfix that, though I am not sure why my own C+++ test is
working :-)
Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080611/fa062bf5/attachment-0001.html
More information about the antlr-interest
mailing list