|
Boost Users : |
Subject: Re: [Boost-users] Xpressive, symantic actions and combination enumeration
From: Lee Simpson (L33Simpson+boostuser_at_[hidden])
Date: 2009-05-06 21:14:26
I'll clean up the source and post it soon.
As for using '_' inside a 'nil', err, no i'm not. That was just a typo in my
example, I've been using captures.
On Thu, May 7, 2009 at 2:51 AM, Eric Niebler <eric_at_[hidden]> wrote:
>
> Lee Simpson wrote:
>
>> Damn. I've just implemented the whole algorithm using your suggested
>> approach, and I've come across a problem.
>> I don't have a simple way to describe my dilemma, so a complex way will
>> ave to do :-/
>>
>
> The best way is to post source code.
>
> First of, I'll describe the way I have implemented your suggestion.
>> First off, I utilize an expression of the form ((s1 = expr) >>
>> keep(nil[action(_,...)])) for each significant component of the expression.
>>
> <snip>
>
> Stop right there. Are you really using nil[action(_,...)] ? In this
> context, xpressive will replace _ with the submatch corresponding to the
> subexpression to which the semantic action is attached. In this case, the
> action is attached to nil, which always matches 0 characters. So your action
> will always be passed an empty submatch. I bet that's not what you want. Did
> you intend nil[action(s1,...)] perhaps?
>
>
> --
> Eric Niebler
> BoostPro Computing
> http://www.boostpro.com
> _______________________________________________
> 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