Lex and YACC under C++ namespace
I'm making a shared library that contains a Lex/YACC parser. To keep the functions generated by Lex/YACC from conflicting with any names in a program linked to the library, I'd like to use namespaces.
The problem is that when I include namespace statements in the Lex input file, they come after some things and before others on the generated file, causing conflicts. Is I simply wrap the namespace statements around the generated file, it won't compile because the #include's are in the namespace.
What should I do?
|