Subject: Re: [boost] Parsing commands with Spirit
Date: 2010-02-02 09:15:46
On Tue, 2 Feb 2010 08:01:51 -0600, "Hartmut Kaiser"
> b) whether you already know where the end of the string is, or otherwise
> have to scan the string once to find the end anyways.
> If you don't know the string length upfront (you have to scan it once to
> find eos), then I'd remember the position of the last separator along
> way and parse the two parts separately. If you do know the eos without
> scanning, you could do two parse steps as well: using reverse_iterators
> rbegin/rend to recognize command2 from the end which gives you the last
> separator and then using the begin/lastsep iterators to recognize
Thanks a lot, I think the two steps parsing is exactly what we need to do.
I should be able to implement this very quickly.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk