Re: GCC as front end for C++ browser?

bill@amber.ssd.hcsc.com (Bill Leonard)
Mon, 24 Jul 1995 19:00:12 GMT

          From comp.compilers

Related articles
[2 earlier articles]
Re: GCC as front end for C++ browser? sanjay@clef.lcs.mit.edu (1995-07-16)
Re: GCC as front end for C++ browser? jan@janhh.shnet.org (1995-07-17)
Re: GCC as front end for C++ browser? sc@iaxp01.inf.uni-jena.de (Sebastian Schmidt) (1995-07-18)
Re: GCC as front end for C++ browser? vmulyk@bnr.ca (victor (v.) mulyk) (1995-07-21)
Re: GCC as front end for C++ browser? vmulyk@bnr.ca (victor (v.) mulyk) (1995-07-21)
Re: GCC as front end for C++ browser? rcd@dooley.cs.brown.edu (1995-07-23)
Re: GCC as front end for C++ browser? bill@amber.ssd.hcsc.com (1995-07-24)
Re: GCC as front end for C++ browser? mrs@cygnus.com (Mike Stump) (1995-07-27)
Re: GCC as front end for C++ browser? hstrelow@ing.puc.cl (strelow fiedler hans christian erich) (1995-07-31)
| List of all articles for this month |

Newsgroups: comp.compilers
From: bill@amber.ssd.hcsc.com (Bill Leonard)
Keywords: C++, tools
Organization: Harris Computer Systems, Ft. Lauderdale FL
References: 95-07-076 95-07-104
Date: Mon, 24 Jul 1995 19:00:12 GMT

sanjay@clef.lcs.mit.edu (Sanjay Ghemawat) writes:
> One thing you might want to ask yourself is whether or not you want
> to parse C++ completely, or just enough to identify various things
> like class declarations etc.


I know that many browsers do this, but I am always distrustful of the
results. Most such browsers come with caveats about not always finding
all occurrences of, say, references to class objects. In some cases,
they do this so that partially-created programs can be browsed.


What I want from a browser, though, is the ability to do queries like "find
me all possible references to the member function Foo of class Bar". I
want to be certain that I've found ALL of them, too, perhaps because I'm
considering changing the interface.


I'd also like to be able to find all references to member variable "bar" in
class Foo, even though I may have many classes that all have a member named
"bar". Again, I want to be sure I find *all* of them.


> C++ is quite a complicated language to
> parse, and you will have to spend a lot of time getting a parser
> integrated in whatever you write.


But if you start with a parser that's already working, I don't think it's
any more work to parse all of it than part of it.


> The resulting parser identifies the definitions of classes, structs,
> methods, functions, and preprocessor macros. It also identifies any
> hierarchical relationships between classes and records the uses of
> all symbols. I shudder to think of what would be necessary if I had
> decided to write a parser for all of C++.


But the original poster wasn't thinking of writing a parser, he's going to
use GCC's. In that case, it would be work to *remove* some of the syntax.


--
Bill Leonard
Harris Computer Systems Corporation
2101 W. Cypress Creek Road
Fort Lauderdale, FL 33309
Bill.Leonard@mail.hcsc.com
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.