#165 Handle C++ namespaces in "yyFlexLexer" macro and "prefix" option

2.5.37
open
nobody
None
5
2014-03-10
2014-03-10
Thomas Riccardi
No

Current flex (v2.5.37) does not handle C++ namespaces in "yyFlexLexer" macro and "prefix" option:

"prefix" is used to prefix "alloc", "realloc", and "free". They are declared in the generated code before including any user code, so the namespace cannot be declared beforehand and the generated C++ file is not valid.

And "yyFlexLexer" is redefined in the generated C++ by ""prefix"FlexLexer", so without namespaces in "prefix" we cannot have namespaces in "yyFlexLexer" either.

Discussion