|
Boost Users : |
Subject: Re: [Boost-users] [spirit] alpha numeric characters
From: Diederick C. Niehorster (dcnieho_at_[hidden])
Date: 2009-12-05 21:08:04
Hi,
not being able to answer any of your other wuestions, I can tell you
that Spirit 2.1, which includes a fully updated an well tested
spirit.qi has just been release with boost 1.41.
Best,
Dee
On Sun, Dec 6, 2009 at 9:51 AM, Ovanes Markarian <om_boost_at_[hidden]> wrote:
> Thanks for that answer. But as far as I see it no, Spirit.Qi is not part of
> boost 1.36?
> At least docs do not state anything, but I can find includes for Qi. I will
> give it a try.
>
>
>
> On Sun, Dec 6, 2009 at 2:24 AM, OvermindDL1 <overminddl1_at_[hidden]> wrote:
>>
>> On Sat, Dec 5, 2009 at 5:33 PM, Ovanes Markarian <om_boost_at_[hidden]>
>> wrote:
>
>
>>
>> You should not be using Spirit.Classic though, instead use Spirit.Qi,
>> which is much better tested and much faster. Â The same code in
>> Spirit.Qi is:
>>
>> +((+alnum)[some_callback_func] >> "->")
>>
>> Or is you just want to stuff all the strings in a vector:
>>
>> std::string input("a->b->c->");
>> std::vector result;
>>
>> parse(input.begin(),input.end(),+(+alnum >> "->"),result);
>>
>> result will be an array of: ["a","b","c"]
>>
>> Also, if you only want the -> to be between strings and not following, use
>> this:
>>
>> (+alnum)%"->"
>>
> I tried it as well, but it nether worked. Unfortunately I have to define a
> grammar and cannot pass strings around.
>
> What I wonder, even
>
> (+range_p('a','z'))[some_callback] parses a->b->c-> as the whole sequence
>
> Many thanks for the answer.
>
> Best Regards,
> Ovanes
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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