regression_less_8563.cpp 994 B

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