|
Boost : |
From: Paul Hamilton (paul_at_[hidden])
Date: 2003-08-21 12:43:44
I want to parse "," separated lists of strings.
I have:
char const* plist_wo_item = "x, y, z";
rule<> list_wo_item;
std::vector<std::string> vec_list;
list_wo_item =
(*anychar_p)[append (vec_list)] >> *( ',' >>
(*anychar_p)[append (vec_list)])
;
parse_info<> result = parse (plist_wo_item, list_wo_item);
if (!result.hit)
return false;
This only places 1 item into vec_list.
What Am I doing wrong?
Paul.
---------------------
Paul Hamilton
pHamtec P/L - Software Makers
http://www.phamtec.com/
mailto:paul_at_[hidden]
The information transmitted is intended only for the person or entity
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the
material from any computer.
-----------------------------------------------------
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk