[antlr-interest] C++ run-time and ref-counters (was TokenStreamRewriteEngine and C++)

Sebastian Kaliszewski sk at z.pl
Wed Apr 21 06:42:56 PDT 2004


Ric Klaren wrote:
> I want antlr to be as lightweight as possible. E.g. no boost installation
> required if I'd grab boost then I'd only scrounge a few files and fit them
> into the antlr build (if their license permits so).

Well, while I don't see problem with licence, it still might be hard, as 
boost smartpointers seem to make use of some other boost stuff. And you'd 
have to deal also with boost autoconfiguration stuff (sarpointers make haevy 
use of compiler & platform specific tunig persent in the boost)

> boost is a plain
> nuisance to build (probably just me ;) )

Well, it's not that bad it's only nonstandard ;)

[snip]
> Stupid thing is that I did not make enough notes when toying with these
> reference counter problems so I don't have a clear listing of the actual
> cases that give problems. I only recall that it's around conversions up and
> down AST-type hierarchies (so when using heterogenous AST's) I basically
> have to spend some serious antlr time on looking at it again and trying a
> few approaches (using custom allocator+garbage collection/change the
> reference counter)

Answered to that in the other post... But once more: informs us, when you're 
playing with it again!

> The archive might turn some up in discussions with
> Michael Tiller if I recall right.

Must look there...

[snip]
> A disadvantage of your reference counter is btw that we have to drop
> support for some compilers due to the use of the member template (but I
> guess that's not that big a deal except if VC6 has trouble with it, then
> again those conversions can be implemented manually if the hierarchy isn't
> too big)

I'm pretty sure MSVC 6.0 supports member templates, it can't deal with 
friend templates, though (but that should not be a problem).

> Another thing that makes me hate the smartpointers is that current gdb's
> still segfault like hell around their use :((((

Is it really that bad? I was debugging my smartpointer library with gdb, and 
didn't encounter any strange problems (anyhing behind typical bad stuff of 
the gdb + additional graphical interface combination).


rgds
-- 
Sebastian Kaliszewski



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list