Boost logo

Boost Users :

Subject: Re: [Boost-users] [qi::phrase_parse] how to retain minus as string
From: Joel de Guzman (djowel_at_[hidden])
Date: 2014-01-23 00:25:34


On 1/23/14, 1:09 PM, Uthpal Urubail wrote:
> I am trying to store minus as the string in the key. I think its getting conflict with
> to(a-z) symbol
> key =+qi::char_(".a-zA-Z0-9") | qi::lexeme[('['>> +qi::char_("@ + -* . ( , ) $ a-zA-Z0-9
> ") >> ']')];
>
> value = +qi::char_("a-zA-Z0-9") ;
>
>
> I have the string like below:
>
> std::string input = “[(@vala - @valb) * @valc]:real";
>
>
> Can someone help me to resolve this?

Put the minus at the end.

Cheers,

-- 
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.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