Re: [Qi] Phrase parsed but iterator did not reach end

Seth <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
On 25-11-17 00:42, Michael Powell wrote:
> Basically to validate all the patterns from 0-65535 (valid port range).

If that's the goal, see 

https://stackoverflow.com/questions/44156112/boost-spirit-qi-changing-tag-of-specialized-uint-parser/44158086#44158086

     uint_parser<uint16_t, 10, 2, 5>();

which correctly parses 0..65535.

A more complete example:

https://stackoverflow.com/questions/47243884/boost-spirit-qi-validating-input-parser/47244585#47244585

Which makes the point that you might want to `lexeme [
uint_parser<uint16_t, 10, 2, 5>() >> !(digit|'.') ]` to avoid partially
matching longer numbers.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Spirit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spirit-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.