Need extraction tool(parser)

Roger Simmons <>
30 Jun 1997 23:05:45 -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: Roger Simmons <>
Newsgroups: comp.compilers
Date: 30 Jun 1997 23:05:45 -0400
Organization: XMission Internet (801 539 0900)
Keywords: tools, question

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.

So for example if I am searching for the pattern " 0 |"
the following procedure would be printed out.

1. First find the pattern
2. backup to procedure heading
3. print from there to the end.

Has something like this already been written?

2250 | CLocaleStack::CLocaleStack(const Locale *l) {
2250 | assert(l);
      0 | new(locales.GetSlot()) CLocaleHolder(l);
2250 | locales.CommitSlot();
2250 | };

This program should be able to handle all cases like 1 line
procedures etc.


Post a followup to this message

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