[antlr-interest] [C target] mutiple inclusion of header files generated by the parser fails
Florent Teichteil
florent.teichteil at gmail.com
Wed Jun 11 13:23:08 PDT 2008
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.
Best,
Florent
More information about the antlr-interest
mailing list