id summary reporter owner description type status milestone component version severity resolution keywords cc 7677 "add_macro_definition(""TEST="") behaves different than #define TEST" klaus.guetter@… Hartmut Kaiser "Test1 posted below produces: INT SPACE EOF SPACE IDENTIFIER SEMICOLON NEWLINE EOF While Test2 produces: INT SPACE IDENTIFIER SEMICOLON NEWLINE EOF The EOF in the third line of Test1 output is produced by the TEST macro expansion. If this expected behaviour? I found this surprising. (MSVC10, Boost 1.51) ---- Code: {{{ typedef cpplexer::lex_token<> token_type; typedef context< string::iterator, cpplexer::lex_iterator > lexer_context_type; void Test1() { string instring(""int TEST x;\n""); lexer_context_type ctx(instring.begin(), instring.end(), """"); ctx.set_language(language_support(support_c99)); ctx.add_macro_definition(""TEST=""); for (lexer_context_type::iterator_type it = ctx.begin(); it != ctx.end(); ++it) cout << get_token_name(token_id(*it)) << endl; } void Test2() { string instring(""#define TEST\nint TEST x;\n""); lexer_context_type ctx(instring.begin(), instring.end(), """"); ctx.set_language(language_support(support_c99)); for (lexer_context_type::iterator_type it = ctx.begin(); it != ctx.end(); ++it) cout << get_token_name(token_id(*it)) << endl; } }}} " Bugs closed To Be Determined wave Boost 1.52.0 Problem fixed