• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*=============================================================================
2     Copyright (c) 2007 Hartmut Kaiser
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 
10 #include <boost/detail/lightweight_test.hpp>
11 #include <boost/spirit/include/classic_core.hpp>
12 #include <boost/spirit/include/classic_actor.hpp>
13 #include <boost/math/concepts/real_concept.hpp>
14 
15 using namespace BOOST_SPIRIT_CLASSIC_NS;
16 using boost::math::concepts::real_concept;
17 
main()18 int main()
19 {
20     real_parser<real_concept> const rr_p;
21     bool started = false;
22     real_concept a, b;
23 
24     parse_info<> pi = parse("range 0 1",
25           str_p("range")[assign_a(started, false)]
26        && rr_p[assign_a(a)]
27        && rr_p[assign_a(b)],
28           space_p);
29 
30     BOOST_TEST(pi.full && a == 0.0 && b == 1.0);
31     return boost::report_errors();
32 }
33 
34