[Boost-bugs] [Boost C++ Libraries] #11327: boost::wave produces non-existent tokens

Subject: [Boost-bugs] [Boost C++ Libraries] #11327: boost::wave produces non-existent tokens
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-05-21 01:13:18


#11327: boost::wave produces non-existent tokens
---------------------------------+---------------------
 Reporter: Vyacheslav Andrejev | Owner: hkaiser
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: wave
  Version: Boost 1.57.0 | Severity: Problem
 Keywords: |
---------------------------------+---------------------
 Consider the following program:
 {{{#!cpp
 #include <iostream>
 #include <string>

 #include <boost/wave.hpp>
 #include <boost/wave/cpplexer/cpp_lex_iterator.hpp>

 using namespace boost::wave::cpplexer;

 int main(int argc, char* argv[])
 {
     std::string str = "int a\n\n;\n";

     typedef lex_iterator<lex_token<> > LexIterator;
     typedef boost::wave::context<std::string::const_iterator, LexIterator>
 WaveContext;

     WaveContext ctx(str.cbegin(), str.cend());
     for (auto tok : ctx)
     {
         std::cout <<
 boost::wave::get_token_name(boost::wave::token_id(tok)) << '('
                   << tok.get_value() << ')' << std::endl;
     }

     return 0;
 }
 }}}
 It produces the following output:
 {{{
 INT(int)
 SPACE( )
 IDENTIFIER(a)
 NEWLINE(
 )
 PP_LINE(#line)
 SPACE( )
 INTLIT(3)
 SPACE( )
 STRINGLIT("<Unknown>")
 NEWLINE(
 )
 SEMICOLON(;)
 NEWLINE(
 )
 EOF()
 }}}
 There are no `PP_LINE(#line)`, `INTLIT(3)` and `STRINGLIT("<Unknown>")` in
 the input.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11327>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC