]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/spirit/test/qi/regression_container_attribute.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / spirit / test / qi / regression_container_attribute.cpp
1 // Copyright (c) 2001-2011 Hartmut Kaiser
2 // Copyright (c) 2011 Joerg Becker
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
7 // compile test only
8
9 #include <boost/spirit/include/qi.hpp>
10 #include <string>
11
12 int main()
13 {
14 namespace qi = boost::spirit::qi;
15
16 qi::rule < std::string::const_iterator, std::string() > const t =
17 "s" >> qi::attr( std::string() );
18
19 boost::spirit::qi::symbols< char, std::string > keywords;
20 keywords.add( "keyword", std::string( "keyword" ) );
21 qi::rule < std::string::const_iterator, std::string() > const u =
22 qi::lexeme[keywords >> !( qi::alnum | '_' )] >> qi::attr( std::string() );
23 }