Questions about Spirit.Qi sequence operator and semantic actions
===

I have some questions about the sequence operator and semantic actions in Spirit Qi.

I'm trying to define a grammar rule for a floating point number that accepts metric prefixes (u, m, k, M, etc.) as well as the normal exponent form.

      rule<Iterator, std::string()> sign = char_("+-") [ _val = _1 ];
      rule<Iterator, std::string()> exp = char_("eE") >> -sign >> +digit;
      rule<Iterator, std::string()> suffix = char_("yzafpnumkKMGTPEZY") [ _val = _1 ];
      rule<Iterator, std::string()> mantissa = ((*digit >> char_('.') >> +digit) | (+digit >> char_('.') >> *digit));
      rule<Iterator, std::string()> unsigned_floating = (mantissa >> -(exp | suffix) | +digit >> (exp | suffix));
      rule<Iterator, std::string()> floating = -sign >> unsigned_floating;


**Question 1:** Why do I have to add a semantic action to the rule `sign` above? Isn't `char` convertible to `std::string`?


**Question 2:** Why does compilation fail when I try to merge the last two rules like this:

      rule<Iterator, std::string()> floating = -sign >> (mantissa >> -(exp | suffix) | +digit >> (exp | suffix));

**Question 3:** Let's say I want to let the attribute of `floating` be `double` and write a semantic action to do the conversion from string to double. How can I refer to the entire string matched by the rule from inside the semantic action?

**Question 4:** In the rule `floating` of Question 2, what does the placeholder `_2` refer to and what is its type?

Thanks!