Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/spirit/test/lazy_tests.cpp @ 33

Last change on this file since 33 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 929 bytes
Line 
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/core.hpp>
10#include <boost/spirit/actor/assign_actor.hpp>
11#include <boost/spirit/dynamic/lazy.hpp>
12#include <boost/spirit/phoenix/primitives.hpp>
13#include <boost/spirit/phoenix/operators.hpp>
14#include <boost/detail/lightweight_test.hpp>
15
16using namespace boost;
17using namespace spirit;
18using namespace phoenix;
19
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
Note: See TracBrowser for help on using the repository browser.