Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Xpressive
From: Jeff Flinn (jeffrey.flinn_at_[hidden])
Date: 2014-08-14 20:09:06


On 8/13/14 8:16 PM, Nat Goodspeed wrote:
> On Wed, Aug 13, 2014 at 7:18 PM, Eric Niebler <eniebler_at_[hidden]> wrote:
>
>> On 8/11/2014 5:27 AM, Goran wrote:
>
>>> So, how can I open a CSV file in text mode, get bidirectional
>>> iterators and hand them over to Xpressive?
>
>> The hard part is implementing a
>> bidirectional iterator that pages in sections of a text file on demand.
>>
>> I'm not aware of such a beast in Boost. If I were to implement one, I'd
>> probably start by looking at the existing support for memory mapped
>> files in Boost.Interprocess.
>
> You might also take a look at multi-pass iterators from Spirit:
> http://www.boost.org/doc/libs/1_56_0/libs/spirit/doc/html/spirit/support/multi_pass.html
>

Unless used with spirit's expectation points, multi-pass will suffer the
same issue raised by the OP as the data is stored in memory as it's read
from file via a std::vector IIRC.

Jeff


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net