1 /*============================================================================= 2 Copyright (c) 2003 Vaclav Vesely 3 http://spirit.sourceforge.net/ 4 5 Use, modification and distribution is subject to the Boost Software 6 License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 7 http://www.boost.org/LICENSE_1_0.txt) 8 =============================================================================*/ 9 #include <boost/spirit/include/classic_core.hpp> 10 #include <boost/spirit/include/classic_assign_actor.hpp> 11 #include <boost/spirit/include/classic_lazy.hpp> 12 #include <boost/spirit/include/phoenix1_primitives.hpp> 13 #include <boost/spirit/include/phoenix1_operators.hpp> 14 #include <boost/detail/lightweight_test.hpp> 15 16 using namespace boost; 17 using namespace BOOST_SPIRIT_CLASSIC_NS; 18 using namespace phoenix; 19 main()20int main() 21 { 22 int result; 23 BOOST_TEST(parse("123", lazy_p(val(int_p))[assign_a(result)]).full); 24 BOOST_TEST((result == 123)); 25 return boost::report_errors(); 26 } 27 28