From: Korcan Hussein (korcan_h_at_[hidden])
Date: 2005-10-23 09:57:34
"Korcan Hussein" <korcan_h_at_[hidden]> wrote in message
> "Larry Evans" <cppljevans_at_[hidden]> wrote in message
>> On 10/22/2005 06:58 AM, Larry Evans wrote:
>> Are you suggesting this as an alternative to Spirit subrules?
> Doesn't need to replace subrules but could be an alternative
> implementation for them, if you read the part:
> ... It might not be apparent but behind the scenes, plain rules are
> actually implemented using a pointer to a runtime polymorphic abstract
> class that holds the dynamic type of the parser assigned to it. When a
> Spirit expression is assigned to a rule, its type is encapsulated in a
> concrete subclass of the abstract class. A virtual parse function
> delegates the parsing to the encapsulated object.
> Rules have drawbacks though:
> It is coupled to a specific scanner type. The rule is tied to a specific
> scanner [see The Scanner Business].
> The rule's parse member function has a virtual function call overhead that
> cannot be inlined.
> That is what automatic type erasing is, i think there is an alternative to
> this that might be worth investigating if not done so already. I'm just on
> the verge of finishing make my (simple, primitive) example tidy, should be
> up in a thew hours.
I made a mistake there, that was about rules :/ well i'm not sure how
subrules i implementated but this could be an alternative implementation for
rules i suppose.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk