diff --git a/ChangeLog b/ChangeLog index 73cd8e6..0553986 100644 --- a/ChangeLog +++ b/ChangeLog @@ -44,6 +44,7 @@ Boost V1.47.0 - Fixed a problem in teh wave driver tool related to #pragma option(output). If wave was invoked in rapid succession this erroneously appended to an existing file instead of overwriting that file. +- Fixed #5569: slex CONTLINE token works only for LF line endings Boost V1.46.0 - V2.2.0 diff --git a/samples/cpp_tokens/slex/cpp_slex_lexer.hpp b/samples/cpp_tokens/slex/cpp_slex_lexer.hpp index 6dbcea1..f07c073 100644 --- a/samples/cpp_tokens/slex/cpp_slex_lexer.hpp +++ b/samples/cpp_tokens/slex/cpp_slex_lexer.hpp @@ -382,7 +382,7 @@ lexer::init_data[INIT_DATA_SIZE] = #endif TOKEN_DATA(SPACE, "[ \t\v\f]+"), // TOKEN_DATA(SPACE2, "[\\v\\f]+"), - TOKEN_DATA(CONTLINE, "\\" "\\n"), + TOKEN_DATA(CONTLINE, Q("\\") "\n"), TOKEN_DATA(NEWLINE, NEWLINEDEF), TOKEN_DATA(POUND_POUND, "##"), TOKEN_DATA(POUND_POUND_ALT, Q("%:") Q("%:")), diff --git a/samples/cpp_tokens/slex_token.hpp b/samples/cpp_tokens/slex_token.hpp index 0818362..8532237 100644 --- a/samples/cpp_tokens/slex_token.hpp +++ b/samples/cpp_tokens/slex_token.hpp @@ -92,7 +92,7 @@ public: stream << std::setw(16) << std::left << boost::wave::get_token_name(id) << " (" - << "#" << token_id(ID_FROM_TOKEN(*this)) + << "#" << token_id(BASEID_FROM_TOKEN(*this)) << ") at " << get_position().get_file() << " (" << std::setw(3) << std::right << get_position().get_line() << "/" << std::setw(2) << std::right << get_position().get_column()