Subject: Re: [boost] [spirit] semantic action for mismatches?
From: Eric Niebler (eric_at_[hidden])
Date: 2011-01-12 01:10:27
On 1/9/2011 9:20 PM, Joel de Guzman wrote:
> On 1/10/2011 9:58 AM, Eric Niebler wrote:
>> I don't know about the "fully typed attributed" part, but type-erasure
>> has nothing to do with it. Xpressive regexes are also type-erased. Only
>> regex algorithms begin the pattern match. That entry point is what sets
>> up the action context, and only the end state of the outermost regex
>> causes the chain of actions to execute. Trust me, it works.
> Of course I trust you! :-) But what works for xpressive might not
> work with Spirit.
> What is the signature of your lazy actions stored in the queue?
Ah, that's a perceptive question that cuts to the quick. That function
accepts only iterators into the matched string and returns void. No
> How do
> you make it accept and return arbitrary types (attributes)? Inherited
> attributes may make use of continuation passing style but synthesized
> attributes can't. That's what I meant. of course attributes do not
> matter in xpressive.
Different design, different trade-offs. I still don't know whether
Spirit's attributes preclude lazy action invocation, though.
I tend to agree with Joel that performance comparisons between xpressive
and Spirit and not that interesting.
-- Eric Niebler BoostPro Computing http://www.boostpro.com