Ticket #8563: regression_less_8563.cpp

File regression_less_8563.cpp, 982 bytes (added by anonymous, 9 years ago)
Line 
1// Copyright (c) 2013 Andreas Pokorny
2//
3// Distributed under the Boost Software License, Version 1.0. (See accompanying
4// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6#define BOOST_SPIRIT_USE_PHOENIX_V3 1
7
8#include <boost/detail/lightweight_test.hpp>
9#include <boost/config/warning_disable.hpp>
10
11#include <boost/phoenix.hpp>
12#include <boost/spirit/include/lex_lexertl.hpp>
13
14#include <fstream>
15
16using namespace std;
17using namespace boost::spirit;
18
19template <typename BaseLexer>
20struct test_lexer : boost::spirit::lex::lexer<BaseLexer>
21{
22 test_lexer()
23 {
24 this->self = lex::string("just something")
25 [
26 lex::_end = lex::less(boost::phoenix::val(1))
27 ]
28 ;
29 }
30};
31
32int main(int argc, char* argv[])
33{
34 typedef lex::lexertl::token<char const*> token_type;
35 typedef lex::lexertl::actor_lexer<token_type> lexer_type;
36
37 test_lexer<lexer_type> lexer;
38
39 return boost::report_errors();
40}