[Boost-bugs] [Boost C++ Libraries] #4425: qi::action ignores phoenix actor return value

Subject: [Boost-bugs] [Boost C++ Libraries] #4425: qi::action ignores phoenix actor return value
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-07-11 20:00:59


#4425: qi::action ignores phoenix actor return value
------------------------------+---------------------------------------------
 Reporter: anonymous | Owner: djowel
     Type: Feature Requests | Status: new
Milestone: Boost 1.44.0 | Component: spirit
  Version: Boost 1.44.0 | Severity: Optimization
 Keywords: |
------------------------------+---------------------------------------------
 Hello,

 this is not really a feature request but rather a design issue: It seems
 to me there is a discrepancy between the behavior of phoenix actors in
 comparison to functors called from qi actions.
 In a functor, you can fail an otherwise successful parser by changing the
 "pass" argument. Intuitively, I would have thought that a phoenix actor
 such as
 eps [phoenix::val(true) == phoenix::val(false)]
 should also fail the parser.
 However, action_dispatch ignores the return value from the actor and
 returns the pass argument, which the phoenix actor does not modify.
 I'm not that well-versed in the insides of phoenix, but I can imagine that
 the actors know nothing about the pass argument. Should it not rather be
 action_dispatch, which in that case should perhaps AND the actor return
 value with the pass argument, so as to catch such cases?

 Just a thought from an otherwise contended spirit user:-)

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4425>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:03 UTC