Opened 10 years ago
#7197 new Feature Requests
Access regex_id from semantic action
Reported by: | Owned by: | Eric Niebler | |
---|---|---|---|
Milestone: | To Be Determined | Component: | xpressive |
Version: | Boost 1.51.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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())
Note:
See TracTickets
for help on using tickets.