On 07/07/2012 07:04 PM, Roman D. Boiko wrote:
On Saturday, 7 July 2012 at 22:45:01 UTC, Chad J wrote:
I see what you mean.
And I think that I expressed myself badly. Let me rephrase.

When the memory hierarchy is deep, every level would require at least
one bit position. Or even every base class would require a separate bit.
(I think that the former + several bits to distinguish among
hierarchies.) Otherwise it would not be easy to check by a bit-mask.
Even if the above is incorrect (and that is likely since I didn't try to
encode that compactly for the real grammar), I think that in general
that information would only be possible to store in a fairly large
integral. Especially if we try to generate parser from grammar, and thus
can't do fine-tuning to pack the information tightly. This overhead
would be paid per each AST node __instance__. But that is not necessary,
since we could store information in a lookup table only once per node
__type__.

Yep. Makes sense.

Reply via email to