|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r70045 - in trunk/libs/spirit/test: . qi
From: hartmut.kaiser_at_[hidden]
Date: 2011-03-16 20:18:10
Author: hkaiser
Date: 2011-03-16 20:18:08 EDT (Wed, 16 Mar 2011)
New Revision: 70045
URL: http://svn.boost.org/trac/boost/changeset/70045
Log:
Spirit: adding test for recently fixed container attribute handling problem
Added:
trunk/libs/spirit/test/qi/regression_container_attribute.cpp (contents, props changed)
Text files modified:
trunk/libs/spirit/test/Jamfile | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
Modified: trunk/libs/spirit/test/Jamfile
==============================================================================
--- trunk/libs/spirit/test/Jamfile (original)
+++ trunk/libs/spirit/test/Jamfile 2011-03-16 20:18:08 EDT (Wed, 16 Mar 2011)
@@ -115,6 +115,7 @@
[ run qi/regression_transform_assignment.cpp : : : : qi_regression_transform_assignment ]
[ compile qi/regression_fusion_proto_spirit.cpp : : qi_regression_fusion_proto_spirit ]
[ compile qi/pass_container3.cpp : : qi_pass_container3 ]
+ [ compile qi/regression_container_attribute.cpp : : qi_regression_container_attribute ]
;
###########################################################################
Added: trunk/libs/spirit/test/qi/regression_container_attribute.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/test/qi/regression_container_attribute.cpp 2011-03-16 20:18:08 EDT (Wed, 16 Mar 2011)
@@ -0,0 +1,23 @@
+// Copyright (c) 2001-2011 Hartmut Kaiser
+// Copyright (c) 2011 Joerg Becker
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// compile test only
+
+#include <boost/spirit/include/qi.hpp>
+#include <string>
+
+int main()
+{
+ namespace qi = boost::spirit::qi;
+
+ qi::rule < std::string::const_iterator, std::string() > const t =
+ "s" >> qi::attr( std::string() );
+
+ boost::spirit::qi::symbols< char, std::string > keywords;
+ keywords.add( "keyword", std::string( "keyword" ) );
+ qi::rule < std::string::const_iterator, std::string() > const u =
+ qi::lexeme[keywords >> !( qi::alnum | '_' )] >> qi::attr( std::string() );
+}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk