Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instantiate lexers with std::string, not flex_string #46

Merged
merged 1 commit into from
Jan 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Instantiate lexers with std::string, not flex_string
The main programs of these samples use std::string to instantiate
their context object, which propagates down to the type of the lexer.
The manual instantiations use BOOST_WAVE_STRINGTYPE a.k.a flex_string
and so do not satisfy the missing symbols, giving a link error.
  • Loading branch information
jefftrull committed May 3, 2019
commit 27dc2862a8754568aeb75670d1e5491c0ecd559c
2 changes: 1 addition & 1 deletion samples/list_includes/instantiate_lexertl_lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
///////////////////////////////////////////////////////////////////////////////

template struct boost::wave::cpplexer::lexertl::new_lexer_gen<
BOOST_WAVE_STRINGTYPE::iterator>;
std::string::iterator>;

#endif // BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0
4 changes: 2 additions & 2 deletions samples/real_positions/instantiate_re2c_lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
///////////////////////////////////////////////////////////////////////////////

template struct boost::wave::cpplexer::new_lexer_gen<
BOOST_WAVE_STRINGTYPE::iterator, boost::wave::util::file_position_type,
std::string::iterator, boost::wave::util::file_position_type,
lex_token<boost::wave::util::file_position_type> >;
template struct boost::wave::cpplexer::new_lexer_gen<
BOOST_WAVE_STRINGTYPE::const_iterator, boost::wave::util::file_position_type,
std::string::const_iterator, boost::wave::util::file_position_type,
lex_token<boost::wave::util::file_position_type> >;

// the suffix header occurs after all of the code
Expand Down