From the output, it's apparent you're matching individual characters, not strings, and full unsigned integers.
Not sure it'll fix it, but try:
bool r = parse(iter, last,
+(+(+char_ - digit)|uint_),
v);
(Note the added +
before char_
.)
The type of v
might need to change to be:
std::vector<boost::variant<std::vector<char>, unsigned int> > v;
, and you might have to fixup the result. Not terribly familiar with Boost Spirit; I bet there's a better, cleaner, way.
Final Solution:
Modify the parse expression to use:
+(as_string[+(char_ - digit)]|uint_)