|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r67455 - in trunk/libs/spirit/test: . qi
From: hartmut.kaiser_at_[hidden]
Date: 2010-12-26 10:30:14
Author: hkaiser
Date: 2010-12-26 10:30:11 EST (Sun, 26 Dec 2010)
New Revision: 67455
URL: http://svn.boost.org/trac/boost/changeset/67455
Log:
Spirit: added test
Added:
trunk/libs/spirit/test/qi/one_element_fusion_sequence.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 2010-12-26 10:30:11 EST (Sun, 26 Dec 2010)
@@ -191,6 +191,7 @@
[ compile qi/debug_optional.cpp : : qi_debug_optional ]
[ run karma/real_scientific.cpp : : : : ]
[ run qi/repeat_regression.cpp : : : : ]
+ [ compile qi/one_element_fusion_sequence.cpp : : qi_one_element_fusion_sequence ]
;
Added: trunk/libs/spirit/test/qi/one_element_fusion_sequence.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/test/qi/one_element_fusion_sequence.cpp 2010-12-26 10:30:11 EST (Sun, 26 Dec 2010)
@@ -0,0 +1,27 @@
+// Copyright (c) 2001-2011 Hartmut Kaiser
+// Copyright (c) 2010 Daniel James
+//
+// 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)
+
+// This compilation test fails if proto expressions are not properly
+// distinguished from 'normal' Fusion sequences.
+
+#include <boost/spirit/include/qi.hpp>
+#include <boost/spirit/include/phoenix.hpp>
+#include <string>
+
+int main()
+{
+ namespace qi = boost::spirit::qi;
+ typedef std::string::const_iterator iterator;
+
+ qi::symbols<char, qi::rule<iterator> > phrase_keyword_rules;
+ qi::rule<iterator, qi::locals<qi::rule<iterator> > > phrase_markup_impl;
+
+ phrase_markup_impl
+ = (phrase_keyword_rules >> !qi::alnum) [qi::_a = qi::_1]
+ ;
+
+ return 0;
+}
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