[comp.lang.c++] tags and pretty printing for C++ programs

peter@mit-amt.MEDIA.MIT.EDU (Peter Schroeder) (09/15/89)

Does anybody out there in netland have a ctags type program (modification?)
to create proper tags for c++ programs when using vi? ctags just does not
like c++ programs...

Also I am looking for a pretty printer for c++ like tgrind or vgrind for c
programs. Anybody have something like that?

Thanks for your help

Peter
peter@media-lab.media.mit.edu

tom@unicads.UUCP (Tom Gerardy) (09/28/89)

In article <706@mit-amt.MEDIA.MIT.EDU> peter@mit-amt.MEDIA.MIT.EDU (Peter Schroe
der) writes:
>Does anybody out there in netland have a ctags type program (modification?)
>to create proper tags for c++ programs when using vi? ctags just does not
>like c++ programs...

I've modified ctags to allow multiple entries for functions other than this it
didn't seem to  be greatly troubled by c++ syntax.  (I was slightly amazed that
it was that easy.)  Tags-ing there in vi will get you to one of the entries!

I also wrote a small utility called 'tag' which displays numbered alternatives
for the function and lets you pick the one you want.  It then launches vi
with the appropriate search command.  You can use from command line or,
of course, with ':!tag ...' from vi... not quite as convienent as the real vi's
tag function, but a close second; I can't modify vi!

The bad news is that I did this work for Unicad, so I will have to get
permission to distribute.  This was just a tool for us not part of a product
so I think chances are fair.  If I can distribute, *where* should I?

	-tom

-- 
   - Tom Gerardy             UUCP: ...!sun!sunpeaks!unicads!tom
     UNICAD, Inc.              or: ...!ncar!{sunpeaks|boulder}!unicads!tom
     1695 38th Street
     Boulder, Colo.  80301         (303) 443-6961

andrew@mitisft.Convergent.COM (Andrew Knutsen) (09/29/89)

in article <664@unicads.UUCP>, tom@unicads.UUCP (Tom Gerardy) says:
> Posted: Wed Sep 27 13:20:35 1989
> In article <706@mit-amt.MEDIA.MIT.EDU> peter@mit-amt.MEDIA.MIT.EDU (Peter Schroe
> der) writes:
>>Does anybody out there in netland have a ctags type program (modification?)
>>to create proper tags for c++ programs when using vi? ctags just does not
>>like c++ programs...
> 
> I've modified ctags to allow multiple entries for functions other than this it
> didn't seem to  be greatly troubled by c++ syntax.  (I was slightly amazed that
> it was that easy.)  Tags-ing there in vi will get you to one of the entries!

	I modified ctags to allow "::" inside function names, so you can
always use the tag command to get the one you want.  However, to really make
tags work, vi has to be able to figure out which class the member you're 
pointing at is in.  This doesnt look as easy.  Another snag is inlines declared
in the class def...

Andrew

PS this ctags was previously hacked by someone else, so I dont feel comfotable
distributing it.
AK
-- 
--------
andrew@convergent.com -or- ctnews!andrew
(408) 435-3623