[antlr-interest] nodes, hidden tokens, garbage collection
Ric Klaren
klaren at cs.utwente.nl
Wed Apr 3 00:51:16 PST 2002
On Tue, Apr 02, 2002 at 03:33:19PM -0800, John Allen Green wrote:
> Like I said - I've just started considering the issues and thinking about
> design options. I'm wondering if anybody has any advice.
>
> For example:
> - has anybody on this list done this sort of thing before?
> - has anybody used, or considered using, a garbage collector with Antlr AST?
> - any other words of wisdom?
Add 2 & 3: You can change the AST's to use a memory pool (add custom
new/delete) and hack a bit on the codegenerator and support lib to
completely loose the RefCounts. This would probably clean the code up quite
a ways. After that build the AST as usual and at the end do a garbage
collection over you memory pool.
I want to implement this kindoff scheme as the default practice for C++
since the reference counter is a PITA. (Or let me rephrase it to I want to
make a devel version that implements this scheme) I planned to do this
around easter but some social stuff got in the way ;)
Losing the reference count would also mean that the debugability of my
project would increase by lots with a gcc 3.0.4, gdb 5.2 prerelease and
dwarf2 debugging info's. Now it's nearly functional except that the
reference counter still throws gdb off.
Cheers,
Ric
--
-----+++++*****************************************************+++++++++-------
---- Ric Klaren ----- klaren at cs.utwente.nl ----- +31 53 4893722 ----
-----+++++*****************************************************+++++++++-------
"I don't have anything against Java - it's the best damn implementation
of UCSD Pascal ever released..." --- Larry Smith
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list