Lacing C/C++ code

elan@tasha.cheme.cornell.edu (Elan Feingold)
Sun, 14 Nov 1993 23:29:00 GMT

          From comp.compilers

Related articles
Lacing C/C++ code elan@tasha.cheme.cornell.edu (1993-11-14)
Re: Lacing C/C++ code ltd@netcom.com (1993-11-15)
Re: Lacing C/C++ code prashanth@cdotd.ernet.in (Prashant V Hedaoo) (1993-11-16)
Re: Lacing C/C++ code mike@vlsivie.tuwien.ac.at (1993-11-29)
| List of all articles for this month |

Newsgroups: comp.compilers
From: elan@tasha.cheme.cornell.edu (Elan Feingold)
Keywords: C, C++, question, comment
Organization: Cornell Theory Center
Date: Sun, 14 Nov 1993 23:29:00 GMT

I want to write a program the laces up C code, i.e. takes


void bob(void)
{
  ...
}


and spits out


void bob(void)
{
  FUNC_START("bob");
  ...
  FUNC_END("bob");
}


for example. All I need to recognize are functions. It would be nice to
recognize C++ type functions too. I was thinking of hacking up the C/C++
grammar available for ftp at places, but does anyone know of a better
(read easier) way to do it?


Thanks in advance,


Elan


--
| Elan Feingold
| CS/EE Depts.
| Cornell University
| Ithaca NY 14850
[I'd be dubious that it's possible to identify function definitions reliably
with any less work than a full parse. Make sure any simpler scheme isn't
confused by declarations of function pointers and the like. -John]
--


Post a followup to this message

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