Boost logo

Boost Users :

Subject: [Boost-users] Adapt rule's attribute to my own Boost::Spirit::Qi
From: Egor Popov (faraslacks_at_[hidden])
Date: 2011-05-03 05:37:44


Hello, everyone.

There is a problem of attribute transfomation: I need to transfom rule's
generated attribute to my own structure. I tried to parse mathematical
formula and store it in std::vector in reverse Polish notation. Formula have
form:

math = as_string(*digit) >> (alpha) >> +(char_('+' | '-') >> math);

rule<Iterator, std::string, space_type> math;

Question #1: what type is it? I think that

fusion::vector<std::string, char, std::vector<fusion::vector<char,
std::string> > >

but it seems it is not so.

Question #2: how can I convert this structure, to mine
(std::vector<std::string>)?

--
View this message in context: http://boost.2283326.n4.nabble.com/Adapt-rule-s-attribute-to-my-own-Boost-Spirit-Qi-tp3492082p3492082.html
Sent from the Boost - Users mailing list archive at Nabble.com.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net