|
Boost : |
Subject: Re: [boost] [spirit]
From: Chandrashekhar Kumar (iitk.cs_at_[hidden])
Date: 2009-06-05 01:29:20
>
>
>> bool
>> parse_numbers(char const* str, vector<double>& v)
>> {
>> return parse(str,
>>
>> // Begin grammar
>> (
>> real_p[push_back_a(v)] >> *(',' >> real_p[push_back_a(v)])
>> )
>> ,
>> // End grammar
>>
>> space_p).full;
>> }
>> <snip>
>>
>> But after running it, I am getting the result as "Parsing failed".
>>
>> I am going thru the doc to understand it better, but any quick spot will
>> help me immensely.
>>
>>
>
> The string that you are parsing begins "A","B","C",...
>
> Naturally, it doesn't match a grammar that parses a
> list of numbers.
>
> In Christ,
> Steven Watanabe
But it is not working for the below as well:
1.0,2.0,3.0,4.0
5.0,6.0,7.0,8.0
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk