|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65114 - in trunk/boost/spirit/home: karma/nonterminal qi/nonterminal
From: hartmut.kaiser_at_[hidden]
Date: 2010-08-29 17:21:21
Author: hkaiser
Date: 2010-08-29 17:21:18 EDT (Sun, 29 Aug 2010)
New Revision: 65114
URL: http://svn.boost.org/trac/boost/changeset/65114
Log:
Spirit: Added exposed attribute to qi::grammar and karma::grammar
Text files modified:
trunk/boost/spirit/home/karma/nonterminal/grammar.hpp | 6 ++++++
trunk/boost/spirit/home/qi/nonterminal/grammar.hpp | 6 ++++++
2 files changed, 12 insertions(+), 0 deletions(-)
Modified: trunk/boost/spirit/home/karma/nonterminal/grammar.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/nonterminal/grammar.hpp (original)
+++ trunk/boost/spirit/home/karma/nonterminal/grammar.hpp 2010-08-29 17:21:18 EDT (Sun, 29 Aug 2010)
@@ -52,6 +52,12 @@
static size_t const params_size = start_type::params_size;
+ template <typename Context, typename Unused>
+ struct attribute
+ {
+ typedef typename start_type::attr_type type;
+ };
+
// the output iterator is always wrapped by karma
typedef detail::output_iterator<OutputIterator, properties>
output_iterator;
Modified: trunk/boost/spirit/home/qi/nonterminal/grammar.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/nonterminal/grammar.hpp (original)
+++ trunk/boost/spirit/home/qi/nonterminal/grammar.hpp 2010-08-29 17:21:18 EDT (Sun, 29 Aug 2010)
@@ -51,6 +51,12 @@
static size_t const params_size = start_type::params_size;
+ template <typename Context, typename Iterator_>
+ struct attribute
+ {
+ typedef typename start_type::attr_type type;
+ };
+
grammar(
start_type const& start
, std::string const& name_ = "unnamed-grammar")
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