[antlr-interest] RE: C++ version, == nullAST

John Green greenj at ix.netcom.com
Thu Oct 4 18:03:41 PDT 2001

I really like this line of thinking. As the C++ codegen for ANTLR evolves, I
for one would be very happy to see it doing things "the STL way".

I'd also be happy to see the Boost libraries taken advantage of. Has
boost::shared_ptr every been considered or discussed? (I haven't looked into


> -----Original Message-----
> From: David Barron [mailto:david.barron at synergex.com]
> Sent: Friday, October 05, 2001 12:31 AM
> To: 'antlr-interest at yahoogroups.com'
> Subject: [antlr-interest] RE: C++ version, == nullAST
> STL uses "empty" as a predicate to determine whether the
> container is empty.
> This should be easy to add to template RefCount < T > :
> // (pseudo code)
> RefCount::empty(const T &x) const
> {
> 	return (T.pointer == NULL);
> }
> Making this a method of RefCount should make things more efficient.
> Checking a pointer against 0 should be faster than checking someAST ==
> nullAST.
> STL uses "clear" is used to clear a container (or part of it).  It may not
> make the code more efficient, but it would make it closer to STL, which
> should make it easier for C++ people to use.
> David

Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

More information about the antlr-interest mailing list