[antlr-interest] Appropriate use of honey badger listeners
Gavin Lambert
antlr at mirality.co.nz
Wed Jan 11 21:30:46 PST 2012
At 17:39 12/01/2012, Kyle Ferrio wrote:
>If all we care about is detecting changes, a significant
>speedup is possible if the interface for a tree object (or
>for listeners acting on trees?) includes a flag that gets
>flipped by any operation which has the possibility of
>changing the tree. (N.B. Possibility, not guarantee. A
>guarantee would require the eval we're trying to avoid.)
The usual solution for that is a version number, initialised to
zero and incremented on any operation that alters the tree. Much
safer than a flag. :)
--
Gavin Lambert, Mirality Systems
<http://www.mirality.co.nz/>
<http://lambert.geek.nz/>
----
Anyone who goes to a psychiatrist ought to have their head
examined.
Few women admit their age. Few men act theirs.
More information about the antlr-interest
mailing list