Re: Need extraction tool(parser) (Michael S. Zraly)
9 Jul 1997 23:16:58 -0400

          From comp.compilers

Related articles
Need extraction tool(parser) (Roger Simmons) (1997-06-30)
Re: Need extraction tool(parser) (The Flanagans) (1997-07-08)
Re: Need extraction tool(parser) (1997-07-09)
Re: Need extraction tool(parser) (David W. Coppit) (1997-07-13)
Re: Need extraction tool(parser) (1997-07-21)
| List of all articles for this month |

From: (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

Post a followup to this message

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