| tgl_list_parser : parse_to_vector |
Parse the string out to a vector.
Any other method of any other object can call this method. This is called 'public' access.
The data-type returned is "booltype"; Not sure.
This method is contained in the object "tgl_list_parser".
The method takes the following arguments:
str : stringtype
The input list.
v : stringvectorptrtype
The vector of strings to output.
The namespaces "boost::spirit" are used.
The files "boost/spirit/core.hpp", "boost/spirit/utility/lists.hpp", "insert_action.hpp" and "set" are included.
if (str == "[]")
return true;
rule<> r =
'[' >>
(*(anychar_p - (ch_p(',') | ch_p(']'))))[append(*v)] >>
*(',' >>
(*(anychar_p - (ch_p(',') | ch_p(']'))))[append(*v)]) >>
']'
;
parse_info<> result = parse(str.c_str(), r);
return result.hit;