Boost logo

Boost :

From: Korcan Hussein (korcan_h_at_[hidden])
Date: 2005-10-23 09:49:11


"Larry Evans" <cppljevans_at_[hidden]> wrote in message
news:435B9E00.3030607_at_cox-internet.com...
> 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:

[qoute]
... 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.

[/quote]

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.

begin 666 bullet.gif
M1TE&.#EA# `,`/,``/___\[.SL;O_YREC&OOUFN]_V.$M5*4:U*$]U)C6E)*
M:S%*,2E:M2$Y8Q 8& ```"'Y! $`````+ `````,``P`0 1%$,A)9U_at_8N_>&
M/$@A%"1!'-.@(&S334M8((QSG%0P''Q0`8%#0G'P612D&>/0,"9D,X,)!3BL
1&*['(K%();[<A>)'!D0``#L`
`
end


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk