Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74054 - trunk/boost/spirit/home/qi/action
From: hartmut.kaiser_at_[hidden]
Date: 2011-08-24 18:23:52


Author: hkaiser
Date: 2011-08-24 18:23:51 EDT (Wed, 24 Aug 2011)
New Revision: 74054
URL: http://svn.boost.org/trac/boost/changeset/74054

Log:
Spirit: Fixing actions for embedded parsers which synthesize attributes
Text files modified:
   trunk/boost/spirit/home/qi/action/action.hpp | 7 ++++++-
   1 files changed, 6 insertions(+), 1 deletions(-)

Modified: trunk/boost/spirit/home/qi/action/action.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/action/action.hpp (original)
+++ trunk/boost/spirit/home/qi/action/action.hpp 2011-08-24 18:23:51 EDT (Wed, 24 Aug 2011)
@@ -66,8 +66,13 @@
             {
                 // call the function, passing the attribute, the context.
                 // The client can return false to fail parsing.
- if (traits::action_dispatch<Subject>()(f, attr, context))
+ if (traits::action_dispatch<Subject>()(f, attr, context))
+ {
+ // Do up-stream transformation, this integrates the results
+ // back into the original attribute value, if appropriate.
+ traits::post_transform(attr_, attr);
                     return true;
+ }
 
                 // reset iterators if semantic action failed the match
                 // retrospectively


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