Qi parse retval vs iterators
Michael Powell <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <CAMEoF_GPuqcUTESbvfyXRJjauohRWB-voNoLf54DdAU9Z58drw@mail.gmail.com> |
Hello, Thanks for the help past couple of days. Something of a mind bender for me, how is it that qi::parse(...) can succeed (return true) and yet the iterator still not reach the end? Is it really that appropriate for attribution to occur when that is the case? Or would it be appropriate to test for that returning, say from a user try_parse(...)? i.e. return parse(first, last, g, result) && first == last; Specifically WRT the uint_parser<uint8_t, 10, 1, 3>() rule. Which "parses" 199 "successfully" (loosely speaking) from "1990", but first does not reach the end, and so "0" is remaining. I should think that if there were any remaining input that would be a failure to match? Thanks! Cheers, Michael Powell ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot