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 #include <boost/detail/lightweight_test.hpp> 7 #include <boost/config/warning_disable.hpp> 8 9 #include <boost/spirit/include/lex_lexertl.hpp> 10 #include <boost/spirit/include/phoenix_core.hpp> 11 #include <boost/spirit/include/phoenix_operator.hpp> 12 13 #include <fstream> 14 15 using namespace std; 16 using namespace boost::spirit; 17 18 template <typename BaseLexer> 19 struct test_lexer : boost::spirit::lex::lexer<BaseLexer> 20 { test_lexertest_lexer21 test_lexer() 22 { 23 this->self = lex::string("just something") 24 [ 25 lex::_end = lex::less(boost::phoenix::val(1)) 26 ] 27 ; 28 } 29 }; 30 main()31int main() 32 { 33 typedef lex::lexertl::token<char const*> token_type; 34 typedef lex::lexertl::actor_lexer<token_type> lexer_type; 35 36 test_lexer<lexer_type> lexer; 37 38 return boost::report_errors(); 39 } 40