Re: Qi parse retval vs iterators

Michael Powell <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <CAMEoF_HhpDdy6ECHv=Vmr5qjws6m550oWeYPSKq90g-0UBnRFA@mail.gmail.com>
On Mon, Dec 4, 2017 at 5:51 PM, Richard <[email protected]> wrote:
> In article <CAMEoF_GPuqcUTESbvfyXRJjauohRWB-voNoLf54DdAU9Z58drw@mail.gmail.com>,
>     Michael Powell <[email protected]> writes:
>
>> 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?
>
> Because you might want to do something with the remaining input that
> is independent of the grammar?

It makes sense that a subsequent parser may want to process the
remaining input, but I wasn't too clear on that at first.

> This is why many of the examples define success as: i) the parser
> returned true and ii) the entire input was consumed.

That's kind of where I was headed with it. Not always, but at least in
my/this case, it makes the most sense.

Thanks!

> -- Richard
>
> --
> "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
>             The Terminals Wiki <http://terminals-wiki.org>
>      The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
>   Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>
>
> ------------------------------------------------------------------------------
> 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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
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.