Subject: Re: [boost] [spirit]
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-06-04 15:35:24
Chandrashekhar Kumar wrote:
> I have to parse the file, the contents of which(with a header) is below and
> stuff the double part only to std::vector<double>:
> 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
> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk