[Boost-bugs] [Boost C++ Libraries] #7197: Access regex_id from semantic action

Subject: [Boost-bugs] [Boost C++ Libraries] #7197: Access regex_id from semantic action
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-06 08:38:17


#7197: Access regex_id from semantic action
------------------------------------+---------------------------------------
 Reporter: zeratul976@… | Owner: eric_niebler
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: xpressive
  Version: Boost 1.51.0 | Severity: Problem
 Keywords: |
------------------------------------+---------------------------------------
 It would be useful to be able to access from a semantic action the
 regex_id of the regex to which the semantic action belongs.

 I propose a special symbol named _regex_id_ for this purpose.

 Examples:


 {{{
 sregex rx = xpr[cout << _regex_id_];
 regex_match(str, rx); // prints rx.regex_id() on success
 }}}



 {{{
 sregex sub = xpr[cout << _regex_id_];
 sregex rx = sub >> another_xpr;
 regex_match(str, rx); // prints sub.regex_id() on success (not
 rx.regex_id())
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7197>
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:10 UTC