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/detail/lightweight_test.hpp> 10 #include <boost/spirit/include/classic_core.hpp> 11 #include <boost/spirit/include/classic_assign_actor.hpp> 12 13 using namespace boost; 14 using namespace BOOST_SPIRIT_CLASSIC_NS; 15 main()16int main() 17 { 18 rule<parser_context<int> > int_rule = int_p; 19 int result(0); 20 parse("123", int_rule[assign_a(result)]); 21 BOOST_TEST(result == 123); 22 return boost::report_errors(); 23 } 24 25