Related articles |
---|
Need extraction tool(parser) rsimmons@xmission.xmission.com (Roger Simmons) (1997-06-30) |
Re: Need extraction tool(parser) stevef7@erols.com (The Flanagans) (1997-07-08) |
Re: Need extraction tool(parser) mzraly@athena.mit.edu (1997-07-09) |
Re: Need extraction tool(parser) dwc3q@mamba.cs.virginia.edu (David W. Coppit) (1997-07-13) |
Re: Need extraction tool(parser) nandu@lucent.com (1997-07-21) |
From: | mzraly@athena.mit.edu (Michael S. Zraly) |
Newsgroups: | comp.compilers |
Date: | 9 Jul 1997 23:16:58 -0400 |
Organization: | Massachvsetts Institvte of Technology |
References: | 97-06-133 97-07-040 |
Keywords: | C++, tools |
Another approach would be to parse only enough C++ to get at the function
and method bodies, then scan the bodies in memory for the pattern. This
is similar to the approach used by cproto for generating function prototypes.
Actually the parsing could be fairly simple-minded, given you really only
need to identify {}-delimited code bodies, handle comments and literals,
and whatnot. Just be careful with method bodies in class declarations:
you probably don't want the whole class declaration printed out.
>Roger Simmons wrote:
>>
>> I need a program that will do the following:
>> Search for a pattern in an annotated .cc or .h C++ source
>> file. When the pattern is found the entire procedure will
>> be printed to stdout.
--
Mike Zraly
mzraly@cs.umb.edu
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.